Discuss
/
JavaScript
/
JS居然没有判断字符串是否在array的方法
JS居然没有判断字符串是否在array的方法
Topic source翻了评论区原来是有的array.includes.改写
var father = document.getElementById('test-list')
L = ['Swift','ANSI C','DirectX']
var s = Array.from(father.children).filter(x=> L.includes(x.innerText)).map(x=>{father.removeChild(x)})
- 1
alienation
总是在莫名奇妙的地方拉胯