js判断数组中有没有指定元素

list.findIndex(target => target.sel === 指定元素) ,如果找到返回下标,如果没有返回-1
原文地址:https://www.cnblogs.com/dianzan/p/10714933.html