print html with js code example Example 1: print things js console.log("Hello World"); Example 2: js how to print console.log(text);