Tell us what’s happening:
Every item seems correct but it does not work! Why??
Thank you in advance.
Your code so far
function Bird() {
let weight=10;
this.getWeight = function(){
return weight;
};
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/68.0.3440.106 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/object-oriented-programming/use-closure-to-protect-properties-within-an-object-from-being-modified-externally