Node.js examples for Array:Array Operation
Use includes method with array of arrays
var array =[[1,5,6],[2,3],[5,8,9]]; function checkAvailability(arr, val) { return arr.some(function(arrVal) { return arrVal.includes(val); });/*from w w w.j av a2 s. co m*/ } checkAvailability(array, 6); // true checkAvailability(array, 12) // false