Js compilation error!

javascript

#1

I am trying to write this code

var line = readline().split(’ ');
print(line);

Why it is not supporting ! Need help ! How to fix this problem ! …
I usually write codes in c++ for problem solving. now trying in js ! but facing problems in c9 platform !
Plz help as soon as possible :slight_smile:


#2

There are a few problems here. First, readline is not a function. I would suggest looking up “reading stdin js” to understand how to take input on the server, or “prompt js” if this is for the client. Second, there is no print function, use console.log instead.