js 判断一个数组是否存在空的元素
['1','2','']
js 怎么判断数组里是否有空
回答
随便给你写几种
['1','2',''].some(r => r==='')
['1','2',''].find(r => r==='') ===''
!['1','2',''].every(r => r!=='')
['1','2',''].includes('')
['1','2','']
js 怎么判断数组里是否有空
随便给你写几种
['1','2',''].some(r => r==='')
['1','2',''].find(r => r==='') ===''
!['1','2',''].every(r => r!=='')
['1','2',''].includes('')