let userInput = prompt('Enter an integer');
console.log(Number(userInput));
I entered ’10’ and it is logging out NaN.
I thought Number() converted a string to a number value.
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
let userInput = prompt('Enter an integer');
console.log(Number(userInput));
I entered ’10’ and it is logging out NaN.
I thought Number() converted a string to a number value.