0
Can't use document.write
Is not defined shows the compiler
3 Réponses
0
it works, may be you have something mistyped.
https://code.sololearn.com/WA3DJMFkcprI/?ref=app
0
document is defined only inside browsers for html documents (web: html/php)...
if the error you get is about document is undefined, then you're probably in a nodejs project (else it's not js), where there's no document (so no method document.write), and you should use console.log (wich is also available in browsers) method to do output ;P
0
Thanks