// 筛选出数组中带有a的元素 var arr = ['aaa','bbb','ccc','dddd','adddd','abbbbb']; var arrs = arr.filter(item => item.indexOf('a') > -1) console.log(arrs) // ["aaa", "adddd", "abbbbb"]