What is the difference between console.log and print in javascript? How console.log basically record it and print only display it on the console, what basically happens behind the scene?
I searched it but i am not able to find the accurate answer there is no specified difference, is there anything present in javascript which behaves like print in other languages?
2
Answers
console.log()
is used for print logging in the console (stdout), whileprint
orwindow.print()
is used for printing the entire HTML document of the webpage."print" is not a standard library for JavaScript’s part. But "console.log" is a function for debugging and logging in JavaScript.