Specifications

the number of items to delete) and there must be no new items
given.
var x = new Array( "a", "b", "c", "d" );
// 2nd argument 0, plus new items ==> insertion
x.splice( 1, 0, "X", "Y" );
// x == [ "a", "X", "Y", "b", "c", "d" ]
// 2nd argument > 0, and no items ==> deletion
x.splice( 2, 1 );
// x == [ "a", "X", "b", "c", "d" ]
// 2nd argument > 0, plus new items ==> replacement
x.splice( 3, 2, "Z" );
// x == [ "a", "X", "b", "Z" ]
Joins all the items of an array together, separated by commas.
This function is used when the array is used in the context of a
toString( ) : String
string concatenation or is used as a text value, example: for
printing. Use join() if you want to use your own separator.
var x = new Array( "a", "b", "c" );
var y = x.toString(); // y == "a,b,c"
var z = x.join(); // y == "a,b,c"
Unshifts (that is, inserts) the given items at the bottom (left) end
of the array.
var x = new Array( "a", "b", "c" );
x.unshift( 121 ); // x == [ 121, "a", "b", "c" ]
unshift( item1 : Object,
optItem2 : Object, ...
optItemN : Object )
Boolean
JavaScript provides a Boolean data type. In general, creating objects of this type is not
recommended since the behavior will probably not be what you would expect.
Instead, use the boolean constants true and false as required. Any expression can be evaluated
in a boolean context, example: in an if statement. If the expression's value is 0, null, false, NaN,
undefined (see built-in constants) or the empty string "", the expression is false; otherwise the
expression is true.
Date
Instances of the Date class are used to store and manipulate dates and times.
A variety of get functions are provided to obtain the date, time or relevant parts, for example,
getDay(), getYear(), getHours(), getMilliseconds(), getMinutes(), getMonth(), getSeconds(), getTime().
A complementary set of functions are also provided, including setYear(), setHours(),
setMilliseconds(), setMinutes(), setMonth(), setSeconds(), setTime().
The functions operate using local time.
Conversion between Date objects to and from strings are provided by parse() and Date::toString().
Elapsed time (in milliseconds) can be obtained by creating two dates, casting them to Number
and subtracting one value from the other.
var date1 = new Date();
374
Enfocus Switch 10