Members of structures and unions in other languages have some analogy with methods and properties of an object. In a procedural language you can access members of a structure by name. So also can you access properties within an object.
A member name is an identifier.
The notation for accessing structure members in C language and property values in JavaScript is identical:
anObject.aProperty
aCStruct.aMember
There is a variation in JavaScript that allows properties to be called as functions, thus:
anObject.aFunctionProperty()
This notation can also denote methods that belong to an object.
| Prev | Home | Next |
| MediaList object | Up | Memory allocation |
JavaScript Programmer's Reference, Cliff Wootton Wrox Press (www.wrox.com) Join the Wrox JavaScript forum at p2p.wrox.com Please report problems to support@wrox.com © 2001 Wrox Press. All Rights Reserved. Terms and conditions. | ||