this is what I do now. Is there a better way?
let flag = true
const listA = [1, 2, 3]
const listB = [2, 3, 4]
if (listA.length !== listB.length) {
flag = false
} else {
listA.forEach(item => {
if (listB.indexOf(item) === -1) {
flag = false
}
})
}