Input in Javascript

Can somebody point me to an answer which is written in JavaScript. I am not new to JS (and I have used Rhino too) but I don’t know how this platform provides input and where to output results. In short, how this platform works with JavaScript.

Thanks in advance.

Hi Codechef uses ‘Rhino’ javascript engine for judging all JS solutions.
You can find the list of all compilers here.

Here is the link to my Sample Solution to a Sample Problem