Java Reference
In-Depth Information
Methods (continued)
Method
Introduced
Description
unshift(value1 [, value2, …])
JavaScript 1.2
Adds elements to the beginning of the
array and returns the new length.
valueOf()
JavaScript 1.1
Returns the primitive value of the array.
Boolean
The Boolean object is used as a wrapper for a Boolean value. It was introduced in JavaScript 1.1. It is
created with the Boolean constructor, which takes as a parameter the initial value for the object (if this
is not a Boolean value, it will be converted into one).
False-y values are null , undefined , “” , and 0 . All other values are considered truth-y.
Properties
Property
Introduced
Description
constructor
JavaScript 1.1
Specifi es the function that creates an object's
prototype.
prototype
JavaScript 1.1
Returns the prototype for the object, which can
be used to extend the object's interface.
Methods
Method
Introduced
Description
toString()
JavaScript 1.1
Converts the Boolean object into a string.
valueOf()
JavaScript 1.1
Returns the primitive value of the Boolean object.
Date
The Date object is used to represent a given date-time. It was introduced in JavaScript 1.0.
Properties
Property
Introduced
Description
constructor
JavaScript 1.1
Used to reference the constructor function for the object.
prototype
JavaScript 1.1
Returns the prototype for the object, which can be used to
extend the object's interface.
Search WWH ::




Custom Search