Java Reference
In-Depth Information
(continued)
function
introduced
description
JavaScript 1.0
Parses a string and returns it as an integer. An
optional second parameter specifies the base
of the number to be converted.
parseInt()
JavaScript 1.2
Converts an object to a string.
String()
JavaScript 1.0
Returns the ASCII string for the specified
hexadecimal encoding value.
unescape()
Javascript core oBJects
This section describes the objects available in the JavaScript core language and their methods and
properties.
array
The Array object represents an array of variables. It was introduced in JavaScript 1.1. An Array
object can be created with the Array constructor:
var objArray = new Array(10); // an array of 11 elements
var objArray = new Array("1", "2", "4"); // an array of 3 elements
Arrays can also be created using array literal syntax:
var objArray = [];
Literal syntax is the preferred method of creating an array.
Properties
property
introduced
description
JavaScript 1.1
Used to reference the constructor function for the object.
constructor
JavaScript 1.1
Returns the number of elements in the array.
length
JavaScript 1.1
Returns the prototype for the object, which can be used to
extend the object's interface.
prototype
Note Square brackets ( [] ) surrounding a parameter means that parameter is
optional.
Search WWH ::




Custom Search