0

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.

James Lee
  • 313
  • 4
  • 17

1 Answers1

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