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