I have an array [\"Lorem\", \"\", \"ipsum\"]. I would like to remove the empty string from this array and get [\"Lorem\", \"ipsum\"].
[\"Lorem\", \"\", \"ipsum\"]
[\"Lorem\", \"ipsum\"]
Is th
You may use filter :
var newArray = oldArray.filter(function(v){return v!==''});
The MDN has a workaround for IE8 compatibility. You might also use a good old loop if you're not going to use filter anywhere else, there's no problem with looping...
filter