Table Head (thead) |
---|
Table Row (tr) |
---|
| Table Head (th) |
---|
| Method Details |
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns a new array comprised of this array joined with other array(s) and/or value(s). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| array.concat(); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns a new array comprised of this array joined with other array(s) and/or value(s). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| array.concat(); |
|
|
|
|
Table Body (tbody) |
---|
id | concat-Object_Object_Object |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Span |
---|
(value1, value2, valueN) |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Returns a new array comprised of this array joined with other array(s) and/or value(s). |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| array.concat(); |
|
|
|
|
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. The callback function is invoked with three arguments: the element value, the element index, the array being traversed. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
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)); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=}{:=}{td}h6.every{td}{tr}{tr:id=sig}{td}{span:style= }[Boolean]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.
The callback function is invoked with three arguments: the element value, the element index, the array being traversed.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Function]} callback
\{[Array]} thisObject
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. The callback function is invoked with three arguments: the element value, the element index, the array being traversed. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
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));
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=filter-Function}{tr:id=name}{td}h6.filter{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Array]{span}{span:style=font-weight: bold;}filter{span}{span}\(callback){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Runs a function on every item in the array and returns an array of all items for which the function returns true.
The callback function is invoked with three arguments: the element value, the element index, the array being traversed.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Function]} callback
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Runs a function on every item in the array and returns an array of all items for which the function returns true. The callback function is invoked with three arguments: the element value, the element index, the array being traversed. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
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); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=}{:=}{td}h6.filter{td}{tr}{tr:id=sig}{td}{span:style= }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Runs a function on every item in the array and returns an array of all items for which the function returns true.
The callback function is invoked with three arguments: the element value, the element index, the array being traversed.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Function]} callback
\{[Array]} thisObject
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Runs a function on every item in the array and returns an array of all items for which the function returns true. The callback function is invoked with three arguments: the element value, the element index, the array being traversed. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
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); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=forEach-Function}{tr:id=name}{td}h6.forEach{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}void{span}{span:style=font-weight: bold;}forEach{span}{span}\(callback){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Runs a function (callback) on every item in the array. The callback function is invoked only for indexes of the array which have assigned values.
The callback function is invoked with three arguments: the element value, the element index, the array being traversed.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Function]} callback
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Runs a function (callback) on every item in the array. The callback function is invoked only for indexes of the array which have assigned values. The callback function is invoked with three arguments: the element value, the element index, the array being traversed. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| function printThemOut(element, index, array) {
application.output("a[" + index + "] = " + element);
}
var a = ['a', 'b', 'c']; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id= Table Body (tbody) |
---|
id | forEach-Function_Object |
---|
| }{:=}{td}h6.forEach{td}{tr}{tr:id=sig}{td}{span:style= }{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Runs a function (callback) on every item in the array. The callback function is invoked only for indexes of the array which have assigned values.
The callback function is invoked with three arguments: the element value, the element index, the array being traversed.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Function]} callback
\{[Object]} thisObject
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}void{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Runs a function (callback) on every item in the array. The callback function is invoked only for indexes of the array which have assigned values. The callback function is invoked with three arguments: the element value, the element index, the array being traversed. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| function printThemOut(element, index, array) {
application.output("a[" + index + "] = " + element);
}
var a = ['a', 'b', 'c']; |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=indexOf-Object}{tr:id=name}{td}h6.indexOf{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Number]{span}{span:style=font-weight: bold;}indexOf{span}{span}\(searchElement){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns the first index at which a given element can be found in the array, or \-1 if it is not present.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} searchElement
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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 |
|
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')); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=}{:=}{td}h6.indexOf{td}{tr}{tr:id=sig}{td}{span:style= }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Returns the first index at which a given element can be found in the array, or \-1 if it is not present.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} searchElement
\{[Number]} fromIndex
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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 |
|
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' |
|
|
|
| ));
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=isArray-Object}{tr:id=name}{td}h6.isArray{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}isArray{span}{span}\(obj){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Checks whether an object is an array or not.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} obj
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Checks whether an object is an array or not. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var a = [1, 2, 3];
application.output(Array.isArray(a)); //prints true
application.output(Array.isArray(23)); //prints false |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=join-String}{tr:id=name}{td}h6.join{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[String]{span}{span:style=font-weight: bold;}join{span}{span}\(delimiter){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Puts all elements in the array into a string, separating each element with the specified delimiter{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[String]} delimiter
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[String]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Puts all elements in the array into a string, separating each element with the specified delimiter |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var words = new Array("limit","lines","finish","complete","In","Out");
var jwords = words.join(";"); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=lastIndexOf-Object}{tr:id=name}{td}h6.lastIndexOf{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Number]{span}{span:style=font-weight: bold;}lastIndexOf{span}{span}\(searchElement){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} searchElement
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
lastIndexOf |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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 |
|
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')); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id= Table Body (tbody) |
---|
id | lastIndexOf-Object_Number |
---|
| }{:=}{td}h6.lastIndexOf{td}{tr}{tr:id=sig}{td}{span:style= | Table Cell (td) |
---|
lastIndexOf |
|
| }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} searchElement
\{[Number]} fromIndex
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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 |
|
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')); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=map-Object}{tr:id=name}{td}h6.map{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Array]{span}{span:style=font-weight: bold;}map{span}{span}\(callback){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Runs a function on every item in the array and returns the results in an array.
The callback function is invoked with three arguments: the element value, the element index, the array being traversed.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} callback
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Runs a function on every item in the array and returns the results in an array. The callback function is invoked with three arguments: the element value, the element index, the array being traversed. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var a = ['a', 'b', 'c']; |
|
|
|
|
var a2 = a.map(function(item) { return item.toUpperCase(); }); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=}{:=}{td}h6.map{td}{tr}{tr:id=sig}{td}{span:style= }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Runs a function on every item in the array and returns the results in an array.
The callback function is invoked with three arguments: the element value, the element index, the array being traversed.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} callback
\{[Array]} thisObject
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Runs a function on every item in the array and returns the results in an array. The callback function is invoked with three arguments: the element value, the element index, the array being traversed. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var a = ['a', 'b', 'c']; |
|
|
|
|
var a2 = a.map(function(item) { return item.toUpperCase(); }); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=pop}{tr:id=name}{td}h6.pop{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}pop{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Pops the last string off the array and returns it.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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(); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=push-Object}{tr:id=name}{td}h6.push{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Number]{span}{span:style=font-weight: bold;}push{span}{span}\(value1){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Mutates an array by appending the given elements and returning the new length of the array.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} value1
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Mutates an array by appending the given elements and returning the new length of the array. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var words = new Array("limit","lines","finish","complete");
words.push("In","Out"); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=}{:=}{td}h6.push{td}{tr}{tr:id=sig}{td}{span:style= }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Mutates an array by appending the given elements and returning the new length of the array.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} value1
\{[Object]} value2
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Mutates an array by appending the given elements and returning the new length of the array. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var words = new Array("limit","lines","finish","complete");
words.push("In","Out"); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id= Table Body (tbody) |
---|
id | push-Object_Object_Object |
---|
| }{:=}{td}h6.push{td}{tr}{tr:id=sig}{td}{span:style= }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Mutates an array by appending the given elements and returning the new length of the array.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} value1
\{[Object]} value2
\{[Object]} valueN
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Number]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Mutates an array by appending the given elements and returning the new length of the array. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var words = new Array("limit","lines","finish","complete");
words.push("In","Out"); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=reverse}{tr:id=name}{td}h6.reverse{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Array]{span}{span:style=font-weight: bold;}reverse{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Puts array elements in reverse order.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Puts array elements in reverse order. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var words = new Array("limit","lines","finish","complete","In","Out");
words.reverse(); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=shift}{tr:id=name}{td}h6.shift{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Object]{span}{span:style=font-weight: bold;}shift{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Decreases array element size by one by shifting the first element off the array and returning it.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Object]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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(); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=slice-Object}{tr:id=name}{td}h6.slice{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Array]{span}{span:style=font-weight: bold;}slice{span}{span}\(begin){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}The slice method creates a new array from a selected section of an array.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} begin
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| The slice method creates a new array from a selected section of an array. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
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); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=}{:=}{td}h6.slice{td}{tr}{tr:id=sig}{td}{span:style= }[Array]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}The slice method creates a new array from a selected section of an array.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} begin
\{[Object]} end
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| The slice method creates a new array from a selected section of an array. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
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); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=some-Function}{tr:id=name}{td}h6.some{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Boolean]{span}{span:style=font-weight: bold;}some{span}{span}\(callback){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.
The callback function is invoked with three arguments: the element value, the element index, the array being traversed.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Function]} callback
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. The callback function is invoked with three arguments: the element value, the element index, the array being traversed. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| function isNumber(value) { return typeof value == 'number'; } |
|
|
|
|
application.output(a1.some(isNumber)); |
|
|
|
|
application.output(a2.some(isNumber)); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=}{:=}{td}h6.some{td}{tr}{tr:id=sig}{td}{span:style= }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}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.
The callback function is invoked with three arguments: the element value, the element index, the array being traversed.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Function]} callback
\{[Array]} thisObject
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Boolean]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| 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. The callback function is invoked with three arguments: the element value, the element index, the array being traversed. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| function isNumber(value) { return typeof value == 'number'; } |
|
|
|
|
application.output(a1.some(isNumber));
|
|
|
|
|
application.output(a2.some( |
|
|
|
| isNumber));
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=sort}{tr:id=name}{td}h6.sort{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Array]{span}{span:style=font-weight: bold;}sort{span}{span}\(){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Sorts the array elements in dictionary order or using a compare function passed to the method.{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Sorts the array elements in dictionary order or using a compare function passed to the method. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var words = new Array("limit","lines","finish","complete","In","Out");
words |
|
|
|
| .sort();
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=sort-Function}{tr:id=name}{td}h6.sort{td}{tr}{tr:id=sig}{td}{span:style=margin-right: 5px;}[Array]{span}{span:style=font-weight: bold;}sort{span}{span}\(function){span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Sorts the array elements in dictionary order or using a compare function passed to the method.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Function]} function
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Body (tbody) |
---|
| Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Sorts the array elements in dictionary order or using a compare function passed to the method. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var words = new Array("limit","lines","finish","complete","In","Out");
words.sort(); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id=}{:=}{td}h6.splice{td}{tr}{tr:id=sig}{td}{span:style= }[Array]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}It is used to take elements out of an array and replace them with those specified.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} arrayIndex
\{[Object]} length
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| It is used to take elements out of an array and replace them with those specified. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
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"); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id= Table Body (tbody) |
---|
id | splice-Object_Object_Object |
---|
| }{:=}{td}h6.splice{td}{tr}{tr:id=sig}{td}{span:style= }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}It is used to take elements out of an array and replace them with those specified.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} arrayIndex
\{[Object]} length
\{[Object]} value1
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| It is used to take elements out of an array and replace them with those specified. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
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"); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id= Table Body (tbody) |
---|
id | splice-Object_Object_Object_Object |
---|
| }{:=}{td}h6.splice{td}{tr}{tr:id=sig}{td}{span:style= }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}It is used to take elements out of an array and replace them with those specified.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} arrayIndex
\{[Object]} length
\{[Object]} value1
\{[Object]} value2
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| It is used to take elements out of an array and replace them with those specified. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
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"); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id= Table Body (tbody) |
---|
id | splice-Object_Object_Object_Object_Object |
---|
| }{:=}{td}h6.splice{td}{tr}{tr:id=sig}{td}{span:style= }[]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}It is used to take elements out of an array and replace them with those specified.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} arrayIndex
\{[Object]} length
\{[Object]} value1
\{[Object]} value2
\{[Object]} valueN
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| It is used to take elements out of an array and replace them with those specified. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
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"); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{tbody:id= Table Body (tbody) |
---|
id | unshift-Object_Object_Object |
---|
| }{:=}{td}h6.unshift{td}{tr}{tr:id=sig}{td}{span:style= }[Array]{span}{span:style= }{span}{span}\ {span}{td}{tr}{tr:id=des}{td}{div:class=sIndent}Places element data at the start of an array.{div}{td}{tr}{tr:id=prs}{td}*Parameters*\\{div:class=sIndent}\{[Object]} value1
\{[Object]} value2
\{[Object]} valueN
{div}{td}{tr}{tr:id=ret}{td}*Returns*\\{div:class=sIndent}[Array]{div}{td}{tr}{tr:id=sam}{td}*Sample*\\{div:class=sIndent}{code:language=javascript}
Table Row (tr) |
---|
| Table Cell (td) |
---|
Div |
---|
| Places element data at the start of an array. |
|
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Parameters |
|
Table Row (tr) |
---|
| Table Cell (td) |
---|
Sample Div |
---|
| Code Block |
---|
| var words = new Array("finish","complete","In","Out");
words.unshift("limit","lines"); |
|
|
|
|
{code}{div}{td}{tr}{tr:class=lastDetailRow}{td}{td}{tr}{tbody}{table} |