windows.print javascript code example
Example 1: javascript window.print
<button onclick="window.print()">Print this page</button>
Example 2: how to code print in javascript
console.log("print")
//or
alert("Print")
<button onclick="window.print()">Print this page</button>
console.log("print")
//or
alert("Print")