+ 1
Why is simple code in JavaScript resulting to error in code playground?
4 Answers
+ 2
Anusi Chidera Paschal
This is Node JS
Use console.log instead of document.write
+ 2
Thank you AJ I really appreciate
+ 1
document.write() might work if your node.js code is inside a html file in a browser.
Instead of document.write() use
console.log()
if you need a new line or
process.stdout.write()
for printing in the same line.
+ 1
Thanks Mario Paes