Jump to content

lostbits

Members
  • Posts

    1
  • Joined

  • Last visited

Posts posted by lostbits

  1. 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.

     

    Example1
    person.lastName;
    Example2
    person["lastName"];
    Accessing Object Properties

    You can access object properties in two ways:

     

    objectName.propertyName()

    or

     

    objectName[propertyName()]
    Shouldn't this be:
    objectName.propertyName
    and
    objectName["propertyName"]
    respectively?

     

×
×
  • Create New...