DLiteScript

arrays Namespace

Functions for working with arrays.

arrays.contains

Check if an array contains a specific value. Return true if the value exists in the array, false otherwise. Part of the arrays namespace.

arrays.join

Join array elements into a single string with a custom delimiter. Concatenate array values with separator between each element. Part of the arrays namespace.

arrays.length

Get the number of elements in an array. Return the array size as a number for iteration and validation. Part of the arrays namespace.

arrays.pop

Remove and return the last element from an array. Modify the array by removing its final element and return the removed value. Part of the arrays namespace.

arrays.push

Add one or more elements to the end of an array. Append multiple values to an array and return the modified array. Part of the arrays namespace.

arrays.reverse

Reverse the order of elements in an array. Flip array elements from last to first and return the reversed array. Part of the arrays namespace.

arrays.slice

Extract a part of an array by start and end index. Return a new array with elements from the range without changing the original. Part of the arrays namespace.

arrays.sortNumbers

Sort a number array in ascending order. Arrange number array elements from smallest to largest and return the sorted array. Part of the arrays namespace.

arrays.sortStrings

Sort a string array alphabetically. Arrange string array elements in alphabetical order from A to Z and return the sorted array. Part of the arrays namespace.

arrays.splice

Remove or replace elements in an array. Modify array by removing elements at index and inserting new values at that position. Part of the arrays namespace.