JAVASCRIPT - HOW TO Split Lines in Textarea or Paragraph - Javascript Source Code

JAVASCRIPT - HOW TO Properly Split a String (Textarea, Paragraph, etc) by New Line Character, Properly, that Works in ALL Devices.

Home Short:

Splitting a block of text, either content of textarea or paragraph or any multiline string, is easily accomplished using the function below. Note the proper parameter for the split for the to work on all devices is /\r?\n/.

To use the above function to successfully split a textarea or paragraph, line by line, and return an array: let arrLines = funcArrLines(strToSplit);

S
H
A
R
E