how to trigger window.print button in javascript code example Example: js how to print console.log(text);