+ 1
wouldn't it be better if i used console.log instead of document.write
what is the difference
2 Réponses
+ 1
console.log is better for debugging and testing your code, and he document.write is for writing on the document. in my opinion i don't like document.write and im also using console.log and alert to see if my code works or not
0
console.log writes to the console, it won't actually write anything on your page, so it's only used for debugging.