摘要: 在JavaScript数组中有时候会存在一些虚假值:null、undefiend、NaN、false、0等。如果不想要的话,传统做法是循环去除, 是否有更简单的方式呢?有,废话不多说: const arry=[1,0,false,NaN,null,'a',undefiend] cosnt filte 阅读全文
posted @ 2023-01-17 17:08 li阿根 阅读(27) 评论(0) 推荐(0) 编辑