I am trying to split string including string but space are also spitted.
my code:-
var a =' that i love
game1 ';
console.log(a.split(' '))
my current output is like:-
(57) ["↵", "", "", "", "", "", "", "", "", "that", "i", "love↵", "", "", "", "", "", "", "", "", "game1↵↵↵", "", "", "", ""]
Output that I am trying to get somthing like this:-
(4)[" that",'i',' love',' ↵game'];
How can I split string in such a way including space and line break??