Child pages
  • Array

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Cache
indextrue
refresh100d
showRefreshtrue
iddoc
titleRefresh page
showDatetrue
retryEnable

servoy sReturnTypes2100%height: 30px;2Supported ClientssWordListSmartClientsWordListWebClientsWordListNGClientsWordListMobileClient

servoy sSummary12%30%58%height: 30px;3Property SummaryGet an element by index.Get the length of the array.

servoy sSummary12%30%58%height: 30px;3Methods SummaryReturns a new array comprised of this array joined with other array(s) and/or value(s).Returns a new array comprised of this array joined with other array(s) and/or value(s).Returns a new array comprised of this array joined with other array(s) and/or value(s).Runs a function on items in the array while that function is returning true.Runs a function on items in the array while that function is returning true.Runs a function on every item in the array and returns an array of all items for which the function returns true.Runs a function on every item in the array and returns an array of all items for which the function returns true.Returns the value of the first element in the provided array that satisfies the provided testing function.Returns the index of the first element in the provided array which satisfies the provided testing function.voidRuns a function (callback) on every item in the array.voidRuns a function (callback) on every item in the array.Returns the first index at which a given element can be found in the array, or -1 if it is not present.Returns the first index at which a given element can be found in the array, or -1 if it is not present.Checks whether an object is an array or not.Puts all elements in the array into a string, separating each element with the specified delimiterReturns the last index at which a given element can be found in the array, or -1 if it is not present.Returns the last index at which a given element can be found in the array, or -1 if it is not present.Runs a function on every item in the array and returns the results in an array.Runs a function on every item in the array and returns the results in an array.Pops the last string off the array and returns it.Mutates an array by appending the given elements and returning the new length of the array.Mutates an array by appending the given elements and returning the new length of the array.Mutates an array by appending the given elements and returning the new length of the array.Reduces the array to a single value by executing a provided function for each value of the array (from left-to-right).Puts array elements in reverse order.Decreases array element size by one by shifting the first element off the array and returning it.The slice method creates a new array from a selected section of an array.The slice method creates a new array from a selected section of an array.Runs a function on items in the array while that function returns false.Runs a function on items in the array while that function returns false.Sorts the array elements in dictionary order or using a compare function passed to the method.Sorts the array elements in dictionary order or using a compare function passed to the method.It is used to take elements out of an array and replace them with those specified.It is used to take elements out of an array and replace them with those specified.It is used to take elements out of an array and replace them with those specified.It is used to take elements out of an array and replace them with those specified.Places element data at the start of an array.

propertyservoy sDetail2100%height:30px2Property Details[index]name

[index]

dessIndent
Get an element by index.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow lengthname

length

dessIndent
Get the length of the array.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 

functionservoy sDetail2100%height:30px2Methods Detailsconcatname

concat(value1)

dessIndent
Returns a new array comprised of this array joined with other array(s) and/or value(s).
prs

Parameters

sIndentvalue1
&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 concatname

concat(value1, value2)

dessIndent
Returns a new array comprised of this array joined with other array(s) and/or value(s).
prs

Parameters

sIndentvalue1
&nbsp ;value2&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 concatname

concat(value1, value2, valueN)

dessIndent
Returns a new array comprised of this array joined with other array(s) and/or value(s).
prs

Parameters

sIndentvalue1
&nbsp ;value2&nbsp ;valueN&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 everyname

every(callback)

dessIndent
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.
prs

Parameters

sIndentcallback
&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 everyname

every(callback, thisObject)

dessIndent
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.
prs

Parameters

sIndentcallback
&nbsp ;thisObject&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 filterfiltername

filter(callback)

dessIndent
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.
prs

Parameters

sIndentcallback
&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 filtername

filter(callback, thisObject)

dessIndent
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.
prs

Parameters

sIndentcallback
&nbsp ;thisObject&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 forEachfindname

forEachprs

Parameters

sIndentcallback 

find(callback)

dessIndent
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.
Returns the value of the first element in the provided array that satisfies the provided testing function.
 If no values satisfy the testing function, undefined is returned.
 The callback function can invoked with three arguments: the element value, the element index(optional), the array being traversed (optional).
prs

Parameters

sIndentcallbacka testing function
ret

Returns

sIndent the element which satisfies the function or undefined
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 forEachfindIndexname

forEach

findIndex(callback

, thisObjectprs

Parameters

sIndentcallback thisObject 

)

dessIndent
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.
Returns the index of the first element in the provided array which satisfies the provided testing function.
 If no values satisfy the testing function, -1 is returned.
 The callback function can invoked with three arguments: the element value, the element index (optional), the array being traversed (optional).
prs

Parameters

sIndentcallbacka testing function
ret

Returns

sIndent the index of the first element which satisfies the function or -1
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 indexOfforEachname

indexOf

forEach(

searchElementprs

Parameters

sIndentsearchElement ret

Returns

sIndent

callback)

dessIndent
Returns the first index at which a given element can be found in the array, or -1 if it is not present.
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.
prs

Parameters

sIndentcallback ;
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 indexOfforEachname

indexOf

forEach(

searchElement

callback,

fromIndexprs

Parameters

sIndentsearchElement fromIndex&nbsp

thisObject)

dessIndent
Returns the first index at which a given element can be found in the array, or -1 if it is not present.
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.
prs

Parameters

sIndentcallback ;thisObject ;
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
indexOfname

indexOf(searchElement)

dessIndent
Returns the first index at which a given element can be found in the array, or -1 if it is not present.
prs

Parameters

sIndentsearchElement ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
indexOfname

indexOf(searchElement, fromIndex)

dessIndent
Returns the first index at which a given element can be found in the array, or -1 if it is not present.
prs

Parameters

sIndentsearchElement ;fromIndex ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
isArrayname

isArray(obj)

dessIndent
Checks whether an object is an array or not.
prs

Parameters

sIndentobj ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
joinname

join(delimiter)

dessIndent
Puts all elements in the array into a string, separating each element with the specified delimiter
prs

Parameters

sIndentdelimiter ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
lastIndexOfname

lastIndexOf(searchElement)

dessIndent
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.
prs

Parameters

sIndentsearchElement ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 isArraylastIndexOfname

isArray

lastIndexOf(

obj

searchElement, fromIndex)

dessIndent
Checks whether an object is an array or not.
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.
prs

Parameters

sIndent
obj&nbspsearchElement ;fromIndex ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 joinmapname

join

map(

delimiter

callback)

dessIndent
Puts all elements in the array into a string, separating each element with the specified delimiter
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.
prs

Parameters

sIndent
delimiter&nbspcallback ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 lastIndexOfmapname

lastIndexOf

map(

searchElement)dessIndentReturns 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.prs

Parameters

sIndentsearchElement&nbsp

callback, thisObject)

dessIndent
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.
prs

Parameters

sIndentcallback ;thisObject ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 lastIndexOfpopname

lastIndexOf

pop(

searchElement, fromIndex

)

dessIndent
Returns
Pops 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.prs

Parameters

sIndentsearchElement fromIndex 
 last string off the array and returns it.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 mappushname

map

push(

callback

value1)

dessIndent
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.
Mutates an array by appending the given elements and returning the new length of the array.
prs

Parameters

sIndent
callback&nbspvalue1 ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 mappushname

map

push(

callback

value1,

thisObject

value2)

dessIndent
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.
Mutates an array by appending the given elements and returning the new length of the array.
prs

Parameters

sIndent
callback thisObject&nbspvalue1 ;value2 ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 poppushname

pop

push(value1, value2, valueN)

dessIndent
Pops the last string off the array and returns it.
Mutates an array by appending the given elements and returning the new length of the array.
prs

Parameters

sIndentvalue1 ;value2 ;valueN ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 pushreducename

push

reduce(

value1prs

Parameters

sIndentvalue1 ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascriptlastDetailRow pushname

push(value1, value2)

dessIndentMutates an array by appending the given elements and returning the new length of the array.prs

Parameters

sIndentvalue1 value2 ret

Returns

sIndentclients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascriptlastDetailRow pushname

push(value1, value2, valueN)

dessIndentMutates an array by appending the given elements and returning the new length of the array.prs

Parameters

sIndentvalue1 value2 valueN ret

Returns

sIndent

f, initialValue)

dessIndent
Mutates an array by appending the given elements and returning the new length of the array.
Reduces the array to a single value by executing a provided function for each value of the array (from left-to-right).
prs

Parameters

sIndentfFunction to execute on each element in the array, taking four arguments: -accumulator: accumulates the callback's return values; it is the accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied (see below). -currentValue: the current element being processed in the array. -currentIndex (Optional): the index of the current element being processed in the array (starts at index 0, if an initialValue is provided, and at index 1 otherwise) -array (Optional): the array reduce() was called upon.initialValueValue to use as the first argument to the first call of the callback. If no initial value is supplied, the first element in the array will be used.
ret

Returns

sIndent Object
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 reversename

reverse()

dessIndent
Puts array elements in reverse order.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 shiftname

shift()

dessIndent
Decreases array element size by one by shifting the first element off the array and returning it.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 slicename

slice(begin)

dessIndent
The slice method creates a new array from a selected section of an array.
prs

Parameters

sIndentbegin
&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 slicename

slice(begin, end)

dessIndent
The slice method creates a new array from a selected section of an array.
prs

Parameters

sIndentbegin
&nbsp ;end&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 somename

some(callback)

dessIndent
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.
prs

Parameters

sIndentcallback
&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 somename

some(callback, thisObject)

dessIndent
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.
prs

Parameters

sIndentcallback
&nbsp ;thisObject&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 sortname

sort()

dessIndent
Sorts the array elements in dictionary order or using a compare function passed to the method.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 sortname

sort(function)

dessIndent
Sorts the array elements in dictionary order or using a compare function passed to the method.
prs

Parameters

sIndentfunction
&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 splicename

splice(arrayIndex, length)

dessIndent
It is used to take elements out of an array and replace them with those specified.
prs

Parameters

sIndentarrayIndex
&nbsp ;length&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 splicename

splice(arrayIndex, length, value1)

dessIndent
It is used to take elements out of an array and replace them with those specified.
prs

Parameters

sIndentarrayIndex
&nbsp ;length&nbsp ;value1&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 splicename

splice(arrayIndex, length, value1, value2)

dessIndent
It is used to take elements out of an array and replace them with those specified.
prs

Parameters

sIndentarrayIndex
&nbsp ;length&nbsp ;value1&nbsp ;value2&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 splicename

splice(arrayIndex, length, value1, value2, valueN)

dessIndent
It is used to take elements out of an array and replace them with those specified.
prs

Parameters

sIndentarrayIndex
&nbsp ;length&nbsp ;value1&nbsp ;value2&nbsp ;valueN&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
 unshiftname

unshift(value1, value2, valueN)

dessIndent
Places element data at the start of an array.
prs

Parameters

sIndentvalue1
&nbsp ;value2&nbsp ;valueN&nbsp ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow