Array Operations
Appending Or Prepending To An Array With A Value
You can use the +
operator to append or prepend a string to an array
Removing A Value From An Array
You can use the -
operator to remove a value at an index or a value in the array
Concatenating Arrays
You can use the ++
operator to concatenate and join multiple arrays together
Range Operator (to)
The to
operator creates an array containing sequential numbers from the first operand to the second operand (inclusive).
Last updated
Was this helpful?