print javascript result in html code example Example 1: print things js console.log("Hello World"); Example 2: print javascript [element].write('My text')