+ 1

Why Is This Code working in sololearn but not in node.js?

https://code.sololearn.com/WVzPH22wpWcJ/?ref=app

8th Oct 2019, 1:38 PM
Chaithanya Bhat
Chaithanya Bhat - avatar
2 Answers
+ 2
this will work if you make some tweaks like providing html code
12th Oct 2019, 1:00 AM
j:D
+ 1
"Node.js is an open-source, cross-platform, JavaScript run-time environment that executes JavaScript code outside of a browser." Wikipedia. Since it's not run in your browser there's no document to write in. Node.js is not the same as JavaScript in your browser! (or to be exact the syntax is the same but not the APIs).
8th Oct 2019, 4:20 PM
Aaron Eberhardt
Aaron Eberhardt - avatar