Tell us what’s happening:
Created a small for loop to print out the property values of the object.
It is not accepting this method as a valid answer.
Did I do it wrong or can this be implemented as an answer?
Your code so far
let dog = {
name: "Spot",
numLegs: 4
};
// Add your code below this line
for (var x in dog){
console.log(dog[x])
}
Your browser information:
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/71.0.3578.98 Safari/537.36
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/object-oriented-programming/use-dot-notation-to-access-the-properties-of-an-object/