Built-In Objects
-
Remember Objects?
-
A combination of properties (variables) and methods (functions)
-
use the new keyword and the constructor to create a new object.
-
Example: var myName = new String("Spiff");
-
where: var states that you are declaring a variable/object instance,
myName is the name of the instance, new is the keyword
for a new instance, String() is the constructor, and "Spiff"
is the parameter passed into that constructor.
-
Can be built-in or user defined.
-
We've used some built-in objects. String, document, etc. We'll
use more.
Attributes, Properties
Home
Internet II: Day 3