DEV Community


Discussion on: My Cry for Help

pepperwood profile image
Kathryn DiPippo

Hello! I was confused by this too when I went to take a look. From what I understand (based on viewing this problem on a YouTube video), this tutorial is teaching you how to use a JavaScript shell? I'm not sure. It's a different flavor of JavaScript than I'm used to seeing used elsewhere.

I believe the trick to getting step 2 to work is to use this handy function:
An example of how to use this:

var exampleInput;
exampleInput = readline();
console.log("Woah! You just enterred: " + exampleInput);

I copied and pasted the above code into and added some text in the Stdin Inputs section, and the correct "Result" showed up at the bottom.

If you get an error with the above code, I've seen other people who are doing this course change the capitalization to be exampleInput = readLine();. I haven't found any reference to this naming outside of what Hackerrank might talk about under the "Tutorial" tab at the top.

ayoazeez26 profile image
Ayoazeez26 Author

Hi, thanks for reaching out, I really appreciate it, here's the link to my challenge it's just basic data types so I don't know why it's not passing the tests

Forem Open with the Forem app