Tell us what’s happening:
Why doesn’t the IDE provide autocomplete for some items. For example during the typing of this line from the example hasOwnProperty doesn’t autopopulate. It does work when you run the code but the IDE makes it seem like hasOwnProperty isn’t valid.
This is the line I am talking about:
if(canary.hasOwnProperty(property)) {
Your code so far
function Bird(name) {
this.name = name;
this.numLegs = 2;
}
let canary = new Bird("Tweety");
let ownProps = [];
// Add your code below this line
for (let property in canary) {
if(canary.hasOwnProperty(property)) {
ownProps.push(property);
}
}
Your browser information:
User Agent is: Mozilla/5.0 (X11; CrOS x86_64 12105.53.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.61 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/object-oriented-programming/understand-own-properties