Each property is a key-value pair, separated by commas. In the example, the first property
is called name and its value is "Superman" , while the property fly is a method.
needs to be quoted. For example, the property "real name" needs to be quoted because
it contains a space.
Note: Property and Method Names in the Real
It's very uncommon to use property and method names that don't follow the
rules for naming variables. In a real-world app, it is likely that the "real
name" property would actually be named real_name or realName .
All objects are mutable at any time when a program is running. This means that its proper-
ties and methods can be changed or removed and new properties and methods can be added
to the object.
Search WWH ::