How can i split the string containing tag using jquery. I tried the following code but it get error in console. I am not sure how to split the strin
Can't you just do something like:
var lines = 'this is for testing How are you'.split('');
Just as a side note if you want to get rid of the empty elements you can filter the lines like so:
lines
// this will get rid of empty elements lines = lines.filter(function(n) { return n; });