I have a string that looks something like this:
"Line 1\nLine 2"
When I call length on it, though, it's one character short:
"Line 1\nLine 2".length // 13
Looking a little closer:
"Line 1\nLine 2".charAt(6)
I find that the \n
is being replaced by a single character, which looks like:
"
"
Is there a way to escape that new line into a \n
?