If I use the first representation, the console will log the name, however in the second one it does output "JS Bin Output", any idea what happened?
let person = {
  name: 'Fred',
  sayMyName: function(params) {
    return (this.name);
  },
};
let obj = person;
person = null;
let sayMyName = obj.sayMyName;
console.log(obj.sayMyName()); // logs `Fred`
console.log(sayMyName()); // logs `JS Bin Output`