Checks if x is a non-null object that has all the provided properties
an object
one or more property names
const a = { b: undefined, c:[0, 1, 2]}hasProp(a, 'b') => truehasProp(a, 'b', 'c') => true // both `a.b` and `a.c` properties existhasProp(a.c, '0', 1, 'length') => true // `a.c` is an array that has all those properties Copy
const a = { b: undefined, c:[0, 1, 2]}hasProp(a, 'b') => truehasProp(a, 'b', 'c') => true // both `a.b` and `a.c` properties existhasProp(a.c, '0', 1, 'length') => true // `a.c` is an array that has all those properties
Checks if x is a non-null object that has all the provided properties