// filter(Boolean) - will remove null, false, NaN, undefined, or the empty string, //the resulting Boolean will be false var srcArr1 = srcArr.filter(Boolean);