Can someone please explain to me what is a Line Terminator? I have trouble searching it online. It may be slightly irrelevant to the question but I would just like to know.
Asked
Active
Viewed 2,556 times
0
-
http://www.ecma-international.org/ecma-262/6.0/#sec-line-terminators – georg Jun 01 '16 at 22:15
1 Answers
2
A line terminator is OS specific. This doesn't have anything to do with JavaScript. On windows a line is terminated by the control character sequence \r\n
, On UNIX like systems, it is \n
.
Recall that control characters aren't printable characters, so the \r
and \n
is conceptual, but usually they're put in string literals to represent the control character.

Ryan
- 14,392
- 8
- 62
- 102
-
Thank you. That really helps me to understand much better than the ones i see in the internet – James Lee Jun 01 '16 at 21:57
-