Tell us what’s happening:
Code is not accepted when getWeight
function accepts a parameter.
Your code so far
function Bird() {
let weight = 15;
this.getWeight = _ => weight;
}
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/113.0
Challenge: Object Oriented Programming - Use Closure to Protect Properties Within an Object from Being Modified Externally
Link to the challenge: