Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const compare = (a, b) => {
- if (!a || !b ) return false
- let count = 0
- a.forEach(aEl => {
- if ( b.some(bEl => aEl === bEl) ) count++
- });
- return count === a.length
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement