javascript - Split a multiple JS string by new line -



javascript - Split a multiple JS string by new line -

i have next multi-line string has been escaped new-lines:

var types = "a\ b\ c\ d";

i'm trying split them new-lines:

var info = types.split('\n');

i've had no luck this.. how do this?

try splitting regex:

types.split(/ */)

live demo

javascript

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -