cara mencetak ke konsol javascript
console.log("string")
Gorgeous Goose
console.log("string")
console.log("Your line would be here")//Prints a line on the console
alert("Your message here")//Raises an alert
console.log("Who's Joe?")
console.log("print")
//or
alert("Print")
document.write("Hello world");
<body onLoad="window.print()">
ou en mettant ce bout de script en début de page entre <head> et </head>
<script language="javascript">
<!--
window.print()
//-->
</script>