I recently learned that if you have a string with multiple lines and you place a backslash at the end of any line, it cancels out the effect of the newline.
For example, let’s say we have a string with backslash at the end of the first line
let s = "Lorem Ipsum is simply
dummy text of the
printing and typesetting industry.
Lorem Ipsum has been "
we will get:
Lorem Ipsum is simply dummy text of the
printing and typesetting industry.
Lorem Ipsum has been
rather than
Lorem Ipsum is simply
dummy text of the
printing and typesetting industry.
Lorem Ipsum has been
I understand this has something to do with backslash being used for escape sequences but I can’t understand why this happens.