What\'s the best way to check for an array with all null values besides using Lodash, possibly with ES6?
var emp = [null, null, null]; if (_.compact(emp).len
Another way to solve this. Is join the array elements and replace the left out ',' with empty space.
var emp = [null, null, null]; if(emp.join(',').replace(/,/g, '').length === 0) { console.log('null'); }