print javascipt code example Example 1: how to code print in javascript console.log("print") //or alert("Print") Example 2: print in js console.log()