5. WHO's in your Bracket!?


Greetings and SALUTATIONS


Code behaved correctly but I am a bit confused as to why it worked? Doesn't setting aProperty to a string ("job") set aProperty to the literal value of "job"? So why does printing aProperty call the first property value of the object james? Thank you for any help!


aProperty = "job"
printing james[aProperty] is similar to james["job"] because we have aProperty = "job". so james["job"] means job property of james object.


Thank you so much! Makes total sense now, mustve been looking at the screen for too long


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