10/30 There are some mistake in lesson definition : List ALL the Properties!


I try this part in my code and that not works

`First, remember that:

dog.species = dog["species"] = "bulldog";

i mean : dog["species"]
my code works without those " " . Something like:

for(var fullName in nyc){

and does not work with " " :

for(var fullName in nyc){

so..any explation?


"" indicates that the object is a string, not a value. So by doing dog["species"], you are saying that dog has a string as a value. This causes a syntax error. Putting a value shows the value of the dog, which is species.

I'm guessing that you have already out a character with a property of species, so that's the explanation I'm giving you. :smiley:


I understand what you try to say. thanks =) .
but in definition of lesson there is this part:
First, remember that:

dog.species = dog["species"] = "bulldog";

I mean : dog["species"]. why they say this?
I really hope you figure out what i'm trying to ask =)


Yeah, I know what you're talking about. The example that says at the left side, right? Yeah, I have no idea why it's like that. Maybe they were trying to explain it better. :smiley: But you get it, right?


Yes i get it,=) it was simple actually. thanks for your time anyway.=)