lostbits Posted October 23, 2014 Share Posted October 23, 2014 see http://www.w3schools.com/js/js_objects.asp I'm reading your tutorial and came across the following. It appears to be wrong and contradicts the examples. Example1person.lastName; Example2person["lastName"]; Accessing Object PropertiesYou can access object properties in two ways: objectName.propertyName() or objectName[propertyName()] Shouldn't this be: objectName.propertyName and objectName["propertyName"] respectively? Link to comment Share on other sites More sharing options...
justsomeguy Posted October 23, 2014 Share Posted October 23, 2014 Yes. Identifiers do not have parentheses on the end. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now