Could someone explain the difference between object.key and object[key], as per the challenge:
has(object, key){
return object[key] !== undefined;
}
…which works, versus:
has(object, key){
return object.key !== undefined;
}
I thought dot notation and square brackets were interchangeable?