Stdin in javascript/nodejs

34 views
Skip to first unread message

Ratul Jain

unread,
Sep 29, 2015, 8:13:08 AM9/29/15
to nodejs
Hey guys I am trying to solve on problem in javascript and I am stuck at taking input from stdin. The question will provide an integer N (number of test cases) followed by N lines. I can't figure out how to take input in this particular way.

    3
    hello
    world
    bye

I have seen some solutions but those are not working in my case. I can't mimic the same behaviour. It should ask for the N and then run the loop N times that takes input from the user and returns the solution for the particular test case
Reply all
Reply to author
Forward
0 new messages