Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

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);
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #array #subset #array
ADD COMMENT
Topic
Name
2+9 =