Checks if array has a key.
Similar: value, values, hasValue, searchValue.
Similar: hasValue, hasPrefix, hasInfix, hasSuffix, hasSubsequence, hasPermutation.
This is part of package extra-array.
This is browserified, minified version of @extra-array/has-key.
It is exported as global variable array_hasKey.
CDN: unpkg, jsDelivr.
array.hasKey(x, [k]);
// x: an array
// k: key?
const array = require('extra-array');
var x = [10, 20, 30];
array.hasKey(x, 2);
// true
array.hasKey(x, 3);
// false
array.hasKey(x, -1);
// true