what is the length of newline separator in JS?
# javascript
a
what is the length of newline separator in JS?
c
image.png
gratitude thank you 1
did you expect something else?
a
CR + LF could be 2:
Copy code
"\r\n".length
gratitude thank you 1
a
so what will be the output of the following:
"lorem\r\nipsum".lines()
listOf("lorem", "ipsum")
listOf("lorem\r", "ipsum")
c
😅 what output? You are just creating lists. Also you can try yourself in the developer console of your browser.
a
I have zero experience with JS, because I'm a server-side developer
c
Then you should get comfortable with it if you are starting with JS development 😉