javascript数组中过滤数值
输入
[1,'',0,undefined, 10, '', '0']
输出
[1, 0, 10, "0"]
[1,'',0,undefined, 10, '', '0'].filter( item => (parseInt(item, 10) == item));
输入
[1,'',0,undefined, 10, '', '0']
输出
[1, 0, 10, "0"]
[1,'',0,undefined, 10, '', '0'].filter( item => (parseInt(item, 10) == item));