0
JavaScript Calling Object's Properties
Hi, everyone. It's been a while since my last visit of this website and i starting to forget about JavaScript's Object. May i ask if Object's name . Property's Name Is the same of Object's name[Property's Name]? Thank you.
1 Odpowiedź
+ 2
Yes basicly it is.
With the brakets you can Access properties with "invalid" Charakters in the name Like obj['fancy-key'].
With the brakets you have to write the property Name as a String with ' or ".
objectName.propertyName
objectName['propertyName']