I think I’m on the right track with this code but I don’t know what’s wrong can you please help me?.
Please find the code below of what I’ve done
Your code so far
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 (Macintosh; Intel Mac OS X 10_12_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/81.0.4044.138 Safari/537.36.
This is my code for in relation to this challenge.
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);
}
}
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);
}
}