167
rated 0 times
[
172]
[
5]
/ answers: 1 / hits: 71837
/ 10 Years ago, thu, september 18, 2014, 12:00:00
I have a string that looks something like this:
Line 1nLine 2
When I call length on it, though, it's one character short:
Line 1nLine 2.length // 13
Looking a little closer:
Line 1nLine 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
?
More From » javascript