Is there a way to read standard input with JavaScript?

后端 未结 5 611
名媛妹妹
名媛妹妹 2020-12-08 20:09

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

5条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-08 20:33

    In some environments like interviewstreet's, they provide you with a function in which all the input is coming as an argument in form of a string.

    All of the input at once.

    Then you have to parse that input to get various tokens out of that string.

    After this you should be good to write the code further.

提交回复
热议问题