Hi, Everyone. Constantly getting this error:
// running test
Maximum call stack size exceeded
// tests completed
Can anyone help?
Your code so far
function Bird() {
let weight = 15;
this.getWeight = function(){
return weight;
};
}
let ducky = new Bird();
ducky.getWeight();
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 6.3; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.99 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/