First, I create a ES5 Function and then create it's prototype:
var Person = function() {};
Person.prototype.city = function() {return 'New York'}I get no error in here. But when I create the same with ES6 fat arrow function, I get Cannot set property 'city' of undefined:
let Person = () => {};
Person.prototype.city = () => {return 'New York'}Why is this?
 
     
    