how to code print in javascript

JavaScript
console.log("print")
//or
alert("Print")
Source

Also in JavaScript: