how to print in js

JavaScript
console.log("string")
console.log(text);
console.log("Your line would be here")//Prints a line on the console 
alert("Your message here")//Raises an alertconsole.log("print")
//or
alert("Print")
Source

Also in JavaScript: