In the Learn JavaScript: Objects. Getters and Setters 12/15 I’m receiving the error. “Did you return ‘Invalid input’ inside of an else statement?” I can’t find the issue with my code.
let person = {
_name: ‘Lu Xun’,
_age: 137,
set age(ageIn) {
if (typeof ageIn === ‘number’) {
this._age = ageIn;
} else {
console.log(‘Invalid Input’)
}
}
};