I saw this for lots of other languages but not JavaScript.
I\'m trying to do problems like: this (codechef.com) and of course the programs need to be able to read
It depends on the environment that your JavaScript is executing in.
In the browser, there is no standard input (the browser isn't a console). The input would come generally from some textbox element in a form on the page.
If you're using something like Rhino, then you can import the standard Java I/O classes and read from stdin that way (see the second example no longer on the wiki).