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
lastDetailRowlengthname

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 ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRowconcatname

concat(value1, value2)

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

Parameters

sIndentvalue1 ;value2 ;
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 ;value2 ;valueN ;
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 ;
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 ;thisObject ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
filtername

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 ;
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 ;thisObject ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
forEachfindname

forEach

find(callback)

dessIndent
Runs
Returns 
a
the 
function
value 
(callback)
of 
on
the 
every
first 
item
element in the 
array. The callback function is invoked only for indexes of the array which have assigned values.
provided array that satisfies the provided testing function.
 If no values satisfy the testing function, undefined is returned.
 The callback function 
is
can invoked with three arguments: the element value, the element index(optional), the array being traversed (optional).
prs

Parameters

sIndentcallback
;a testing functionret

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

, thisObject

)

dessIndent
Runs
Returns 
a
the 
function
index 
(callback)
of 
on
the 
every
first 
item
element in the provided array
.
 
The
which 
callback
satisfies 
function
the 
is
provided 
invoked
testing 
only
function.
for
 
indexes
If 
of
no 
the
values 
array
satisfy 
which
the 
have assigned values
testing function, -1 is returned.
 The callback function 
isthisObject ;
can invoked with three arguments: the element value, the element index (optional), the array being traversed (optional).
prs

Parameters

sIndentcallback
;a testing functionret

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(

searchElement

callback)

dessIndent
Returns
Runs 
the
a 
first
function 
index
(callback) 
at
on 
which
every 
a given element can be found in
item in the array. The callback function is invoked only for indexes of the array
, or -1 if it is not present.prs

Parameters

sIndentsearchElement ;ret

Returns

sIndent
 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,

fromIndex

thisObject)

dessIndent
Returns the first index at which 
Runs a 
given
function 
element
(callback) 
can
on 
be
every 
found
item in the array
,
. 
or
The 
-1
callback 
if it is not present
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

sIndent
searchElementcallback ;fromIndexthisObject ;retclientsclients

ReturnssIndent

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
isArrayindexOfname

isArray

indexOf(

obj

searchElement)

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

Parameters

sIndent
objsearchElement ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
joinindexOfname

join

indexOf(

delimiter

searchElement, fromIndex)

dessIndent
Puts
Returns 
all elements
the first index at which a given element can be found in the array
into a string
, 
separating
or 
each
-1 
element
if 
with
it 
the
is 
specified
not 
delimiter
present.
prs

Parameters

sIndent
delimitersearchElement ;fromIndex ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
lastIndexOfisArrayname

lastIndexOf

isArray(

searchElement

obj)

dessIndent
Returns
Checks 
the
whether 
last
an 
index
object 
at
is 
which
an 
a given element can be found in the array, or -1 if it is not present. The array is searched backwards, starting at fromIndex
array or not.
prs

Parameters

sIndent
searchElementobj ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
lastIndexOfjoinname

lastIndexOf

join(

searchElement, fromIndex

delimiter)

dessIndent
Returns
Puts 
the
all 
last
elements 
index
in 
at
the 
which
array into a 
given
string, 
element
separating 
can
each 
be
element 
found in
with the 
array, or -1 if it is not present. The array is searched backwards, starting at fromIndex.fromIndex
specified delimiter
prs

Parameters

sIndent
searchElement ;delimiter ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
maplastIndexOfname

map

lastIndexOf(

callback

searchElement)

dessIndent
Runs
Returns 
a
the 
function
last 
on
index 
every
at 
item
which 
in
a 
the
given 
array
element 
and
can 
returns
be 
the results
found in 
an
the array
. The callback function
, or -1 if it is 
invoked
not 
with
present. 
three
The 
arguments:
array 
the
is 
element
searched 
value
backwards, 
the
starting 
element index, the array being traversed.prs
at fromIndex.
prs

Parameters

sIndent
callbacksearchElement ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
maplastIndexOfname

map

lastIndexOf(

callback

searchElement,

thisObject

fromIndex)

dessIndent
Runs
Returns the last index at which a given 
function
element 
on
can 
every
be 
item
found in the array, 
and
or 
returns
-1 
the
if 
results
it 
in
is 
an
not 
array
present. The 
callback function
array is 
invoked with three arguments: the element value, the element index, the array being traversed
searched backwards, starting at fromIndex.
prs

Parameters

sIndent
callbacksearchElement ;thisObjectfromIndex ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
popmapname

pop

map(callback)

dessIndent
Pops the last string off
Runs a function on every item in the array and returns 
it.ret
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 ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
pushmapname

push

map(

value1

callback, thisObject)

dessIndent
Mutates
Runs 
an
a 
array
function 
by
on 
appending
every 
the
item 
given
in the 
elements
array and
returning
 returns the results in an array.
The callback function is invoked with three arguments: the 
new length of
element value, the element index, the array being traversed.
prs

Parameters

sIndent
value1callback ;thisObject ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
pushpopname

push

pop(

value1, value2

)

dessIndent
Mutates value2
Pops the last string off the array and returns it.
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
pushname

push(value1)

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

Parameters

sIndentvalue1
; ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
pushname

push(value1, value2

, valueNvalueN

)

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

Parameters

sIndentvalue1 ;value2
; ;ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow
pushname

push(value1, value2, valueN)

dessIndent
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
reducename

reduce(f, initialValue)

dessIndent
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 ;
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 ;end ;
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 ;
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 ;thisObject ;
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 ;
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 ;length ;
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 ;length ;value1 ;
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 ;length ;value1 ;value2 ;
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 ;length ;value1 ;value2 ;valueN ;
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 ;value2 ;valueN ;
ret

Returns

sIndent
clients

Supported Clients

sIndentSmartClient,WebClient,NGClient,MobileClient
sam

Sample

sIdentjavascript
lastDetailRow