Pls what's the difference between JavaScript: console.log and Document.write | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 5

Pls what's the difference between JavaScript: console.log and Document.write

JavaScript

22nd Sep 2021, 7:00 AM
Suh Joy
Suh Joy - avatar
1 Answer
+ 3
document.write() Will REPLACE THE CURRENT DOCUMENT CONTENTS. While, console.log() Will ADD TEXT TO THE JS CONSOLE..
28th Sep 2021, 3:53 PM
Sancho Godinho
Sancho Godinho - avatar