Java Reference
In-Depth Information
(continued)
Method
introduced
description
some(testFn(element,
index, array))
JavaScript 1.6
Iterates over the array, executing
testFn()
on every element. Returns
true
if at least one
result of
testFn()
is
true
.
JavaScript 1.1
Sorts the elements of the array. Executes
sortFn()
for sorting if it is provided.
sort([sortFn(a,b)])
splice(startIndex [,
length, value1, ...)
JavaScript 1.2
Removes the amount of elements denoted
by
length
starting at
startIndex
. Provided
values replace the deleted elements. Returns
the deleted elements.
JavaScript 1.1
Converts the
Array
object into a string.
toString()
unshift(value1 [,
value2, ...])
JavaScript 1.2
Adds elements to the beginning of the array
and returns the new length.
JavaScript 1.1
Returns the primitive value of the array.
valueOf()
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).
Falsey values are
null
,
undefined
,
""
, and
0
. All other values are considered truthy.
Properties
property
introduced
description
JavaScript 1.1
Specifies the function that creates an object's prototype.
constructor
JavaScript 1.1
Returns the prototype for the object, which can be used to
extend the object's interface.
prototype
Methods
Method
introduced
description
JavaScript 1.1
Converts the
Boolean
object into a string.
toString()
JavaScript 1.1
Returns the primitive value of the
Boolean
object.
valueOf()
date
The
Date
object is used to represent a given dateātime. It was introduced in JavaScript 1.0.