Example: Creating objects
In the example, observe the following:
- Two different kinds of syntax are used to access values of properties.
- A for loop can be used to process all values.
- The radius is first changed and then removed, resulting in the value
undefined
. - The value of
feature
is initiallyundefined
and then, after the property has been added, is assigned the valuenose
. - Due to aliasingA situation in which two different names are used for the same data., the changes made to
myCircle
have also been made tonewCircle
.
Note:
Hints:
- undefined
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
1
2
var newCircle;
var prop;
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX