js的中去除数组中的null

1. 去除数组中的空值

array = [null,"熊春辉","李玉元"]
list = []
array.map((value) =>{
	if(!!value){
	list.push(value)
}
})

发布了37 篇原创文章 · 获赞 0 · 访问量 628

猜你喜欢

转载自blog.csdn.net/xionglaine/article/details/104498761
今日推荐