javascript is array a subset of array
const PlayerOne = ['B', 'C', 'A', 'D'];
const PlayerTwo = ['D', 'C'];
const result = PlayerTwo.every(val => PlayerOne.includes(val));
console.log(result);let superSet = ['B', 'C', 'A', 'D'];
let subSet = ['D', 'C'];
let mixedSet = new Set([...superSet, ...subSet]);
let isSubset = mixedSet.size == superSet.length
Also in JavaScript:
- return string from javascript function
- Flip a coin
- javascript decimal to string
- javascript loop through array backwords
- how to store and delete s3 image using node js
- javascript substring messes emoji
- Javascript - Track mouse position
- javascript coding interview questions github
- join method javascript
- angularjs fractionSize with dot
- delete node module
- angularjs find and update object in array
- chromepicker react-color not working
- how to get the last element of an array in javascript
- js find longest word in string function
- angular json and cli json file
- javascript group array of objects lodash
- feather icons react
- javascript remove element from array
- url decode javascript
- react native sharing common options across screens
- jquery on dom change
- how to comments in json file
- print array without brackets javascript