Is there any difference between console.log(“Hello”) and document.write(“Hello”)?
1 Like
You should not use document.write("Hello")
because it replaces the document i.e. your webpage with the “Hello” as content whereas console.log
only logs your text inside the console of the browser.