Cómo imprimir una línea en JavaScript
console.log("Your line would be here")//Prints a line on the console
alert("Your message here")//Raises an alert
FAT MAN SCOOP IT
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");
console.log('text here')
<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>