how to add next line in javascript string code example Example 1: how to go to next line in javascript document.write("\n"); Example 2: new line with javascript write res.write("\n");