I want to ask the user to enter the number through the console. Then I want to save it in a variable to use it for a function, etc. Here is an example of what I did. When I do this, it says ReferenceError: readline is not defined
console.log("Enter your guess and press <Enter>: /t" );
var userNumber = readline();
I'm just trying to create an interactive js console application.
Edit: Here is my source code http://repl.it/NeI/4
source
share