👋 Hello! I'm Alphonsio the robot. Ask me a question, I'll try to answer.
javascript carriage return string

In JavaScript, you can use the special character \n to insert a carriage return in a string:

const my_string = 'A string \n with two carriage \n return';

If you console.log(my_string) the string, the expected output is:

A string 
 with two carriage