fazlurr
6/28/2016 - 10:40 AM

Remove Whitespace-only Array Elements - http://stackoverflow.com/a/20668919/1703124

Remove Whitespace-only Array Elements - http://stackoverflow.com/a/20668919/1703124

var array = ['1', ' ', 'c'];

array = array.filter(function(str) {
  return (/\S/).test(str);
});