This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* Returns true if the 2nd array is a subset of 1st array. False otherwise. | |
*/ | |
function isSubet (arr1, arr2) { | |
return arr2.every(function (val) { | |
return arr1.indexOf(val) >= 0; | |
}); | |
} | |
/* Example of how the above function works |