return new line in javascript code example Example 1: new line javascript console.log('Hello \n World'); Example 2: new line with javascript write res.write("\n");