Compare if values in array jquery code example
Example 1: jquery check if value is in array
$.inArray( 5 + 5, [ "8", "9", "10", 10 + "" ] );
Example 2: jquery array compare values
const a1 = [1,2,3];
const a2 = [1,3,2];
const a3 = [1,3,4];
(arr1).not(a2).length === 0 && $(arr2).not(a1).length === 0; // true
(arr1).not(a3).length === 0 && $(arr2).not(a2).length === 0; // false