console.log(text);
console.log(a); // write to the browser console
document.write(a); // write to the HTML
alert(a); // output in an alert box
confirm("Really?"); // yes/no dialog, returns true/false depending on user click
prompt("Your age?","0"); // input dialog. Second argument is the initial value
console.log("Who's Joe?")
console.log("Text");
var randomText = "randomText";
console.log(randomText);
console.err("Error: U Looked at this comment");
//Logs an error.
console.log("print")
//or
alert("Print")
document.write("Hello world");
function printpage(){
var originalContents = document.body.innerHTML;
var printReport= document.getElementById('div1').innerHTML;
document.body.innerHTML = printReport;
window.print();
document.body.innerHTML = originalContents;
}
console.log("Aighte, bet");
//javascript print full webpage
print()
console.log("text you want to log")
console.log("Your text")
console.log("hi usr")
;console.log(text)
//print in the window
document.write("Have a nice day!");
//print in the console log (Right click->Inspect ->Console)
console.log("Have a nice day!");
console.log('text here')
console.log(a); // write to the browser console
document.write(a); // write to the HTML
alert(a); // output in an alert box
confirm("Really?"); // yes/no dialog, returns true/false depending on user click
prompt("Your age?","0"); // input dialog. Second argument is the initial value