how to format multiline string in javascript 1

how to format multiline string in javascript

const htmlString = `Say hello to 
multi-line
strings!`;

Here is what the above code is Doing:
1. We’re creating a variable called htmlString.
2. We’re assigning it a string that contains a multi-line string.
3. We’re using the backslash character (\) to escape the newline character (\n).

Similar Posts