Accessing properties part 2


#1

https://www.codecademy.com/en/courses/spencer-sandbox/1/4?curriculum_id=506324b3a7dffd00020bf661#

i dont know whats going on here.need help please,
Oops, try again. Make sure to save the dog's weight into 'weight'.:

var dog = {
species: "greyhound",
weight: 60,
age: 4
};

var species = dog["species"];
// fill in the code to save the weight and age using bracket notation
var weight = dog["60"];
var age = dog["4"];

`


#2

You should be accessing the way weight & age like so:

var weight = dog["weight"];
var age = dog["age"];

Just like the example they give with species.


#3

,,,,,,,,,,,,,,,,,,,,,
thank you


#4

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.