Cara Memeriksa Nilai yang Disediakan dalam Array di JavaScript
// how to check provided value is in array in javascript
const is = (type, val) => val.constructor === Array;
console.log(is(Array, [1])); // true
console.log(is(Array, 1)); // false
Chetan Nada