How do I take CodeChef input?

I just started on this site and am completely confused. How do you take the test case input? Could someone give a simple example?

Write a loop in any language you prefer.

Consider this problem

Following code is in python:

t = int(input())
while t:
    n, x = map(int, input().split())
    l = list(map(int, input().split()))
    t -= 1

This doesn’t help with the input. I use Javascript and am trying to figure out whether arguments are passed to a function or taken some other way.

Found a related question: https://discuss.codechef.com/questions/46860/input-in-javascript.

Found my answer in this question: https://discuss.codechef.com/questions/72647/life-the-universe-and-everything-nodejs-solution. I will test it and come back witth the result.