print a message in javascript code example Example 1: javascript print document.write("Hello world"); Example 2: print in javascript console.log("")