Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Array |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| concat |
Span |
---|
| (value1, [value2], [valueN]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns a new array comprised of this array joined with other array(s) and/or value(s). |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Array |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
array.concat();
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Boolean |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| every |
Span |
---|
| (callback, [thisObject]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Runs a function on items in the array while that function is returning true. It returns true if the function returns true for every item it could visit. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {Function} callback {Array} [thisObject] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
function isNumber(value) { return typeof value == 'number'; }
var a1 = [1, 2, 3];
application.output(a1.every(isNumber));
var a2 = [1, '2', 3];
application.output(a2.every(isNumber));
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Array |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| filter |
Span |
---|
| (callback, [thisObject]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Runs a function on every item in the array and returns an array of all items for which the function returns true. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {Function} callback {Array} [thisObject] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Array |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var a1 = ['a', 10, 'b', 20, 'c', 30];
var a2 = a1.filter(function(item) { return typeof item == 'number'; });
application.output(a2);
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| void |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| forEach |
Span |
---|
| (callback, [thisObject]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Runs a function on every item in the array. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {Function} callback {Array} [thisObject] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns void |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
function printThemOut(params) { application.output(params);}
var a = ['a', 'b', 'c'];
a.forEach(printThemOut);
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Number |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| indexOf |
Span |
---|
| (searchElement, [fromIndex]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns the first index at which a given element can be found in the array, or -1 if it is not present. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {Object} searchElement {Number} [fromIndex] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var a = ['a', 'b', 'a', 'b', 'a'];
application.output(a.indexOf('b'));
application.output(a.indexOf('b', 2));
application.output(a.indexOf('z'));
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| String |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| join |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Puts all elements in the array into a string, separating each element with the specified delimiter |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {String} delimiter |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var words = new Array("limit","lines","finish","complete","In","Out");
var jwords = words.join(";");
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
lastIndexOf |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Number |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| lastIndexOf |
Span |
---|
| (searchElement, [fromIndex]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns the last index at which a given element can be found in the array, or -1 if it is not present. The array is searched backwards, starting at fromIndex. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {Object} searchElement {Number} [fromIndex] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var a = ['a', 'b', 'c', 'd', 'a', 'b'];
application.output(a.lastIndexOf('b'));
application.output(a.lastIndexOf('b', 4));
application.output(a.lastIndexOf('z'));
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Array |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| map |
Span |
---|
| (callback, [thisObject]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Runs a function on every item in the array and returns the results in an array. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {Object} callback {Array} [thisObject] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Array |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var a = ['a', 'b', 'c'];
var a2 = a.map(function(item) { return item.toUpperCase(); });
application.output(a2);
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Object |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| pop |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Pops the last string off the array and returns it. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var words = new Array("limit","lines","finish","complete","In","Out");
var lastword = words.pop();
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Number |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| push |
Span |
---|
| (value1, [value2], [valueN]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Mutates an array by appending the given elements and returning the new length of the array. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var words = new Array("limit","lines","finish","complete");
words.push("In","Out");
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Array |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| reverse |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Puts array elements in reverse order. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Array |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var words = new Array("limit","lines","finish","complete","In","Out");
words.reverse();
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Object |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| shift |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Decreases array element size by one by shifting the first element off the array and returning it. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var words = new Array("limit","lines","finish","complete","In","Out");
words.shift();
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Array |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| slice |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
The slice method creates a new array from a selected section of an array. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Array |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var words = new Array("limit","lines","finish","complete","In","Out");
var nwords1 = words.slice(3, 5);
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Boolean |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| some |
Span |
---|
| (callback, [thisObject]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Runs a function on items in the array while that function returns false. It returns true if the function returns true for any item it could visit. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {Function} callback {Array} [thisObject] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
function isNumber(value) { return typeof value == 'number'; }
var a1 = [1, 2, 3];
application.output(a1.some(isNumber));
var a2 = [1, '2', 3];
application.output(a2.some(isNumber));
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Array |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| sort |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sorts the array elements in dictionary order or using a compare function passed to the method. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters {Function} [function] |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Array |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var words = new Array("limit","lines","finish","complete","In","Out");
words.sort();
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Array |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| splice |
Span |
---|
| (arrayIndex, length, [value1], [value2], [valueN]) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
It is used to take elements out of an array and replace them with those specified. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Array |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var words = new Array("limit","lines","finish","complete","In","Out");
var nwords1 = words.splice(3, 2, "done", "On");
|
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
style | float: left; margin-right: 5px; |
---|
| Array |
Span |
---|
style | float: left; font-weight: bold; |
---|
id | iets |
---|
| unshift |
Span |
---|
| (value1, value2, valueN) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Places element data at the start of an array. |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Returns Array |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample
Div |
---|
| Code Block |
---|
|
var words = new Array("finish","complete","In","Out");
words.unshift("limit","lines");
|
|
|
|
|
|