— Const has = Object.prototype.hasOwnProperty; // cache the lookup once, in module scope.
— Do you guys prefer the prototype chain over the class syntax?
— So you have to do:
if (has.call(obj, key)) {
?
— Thats airbnbs first choice
— const hop = Object
.prototype
.hasOwnProperty;
const has = (obj, key) =>
hop.call(obj, key);
if (has(obj, key)) {
Message permanent page
— Sooo if i use if(obj.key) and the obj is null... its the same error isnt it?