SOURCE

let str1 = ['DL_ALI_PAY=824', 'ALI_PAY=24', 'MM_SMS=33', 'YH_MM_SMS=300']
let str2 = ['ALI_PAY=255', 'YH_MM_SMS=300']

let newStr2 = str2.filter(item => {
    // console.log(item)
    // console.log(str1.includes(item))
    return !str1.includes(item)
})

// console.log('newStr2: ' + newStr2)

// str2.forEach(item => {
//     let isChecked = str1.includes(item)
//     console.log(isChecked)
// })

// console.log(str2) // forEach,filter不改变原数组
// console.log(str1.includes(str2))


let newArr = str2.filter(item => {
    return str1.includes(item)
})
console.log(newArr)
// console.log(str1.includes(...newArr))
console 命令行工具 X clear

                    
>
console