Array.clone

Array.clone

Array.clone

Function

Returns a deep copy of the array.

Syntax

Parameters

No parameters.

Return value

TypeDescription
ArrayReturns the new array value.

Example

Notes

  • Clone will recursively copy mutable containers such as arrays, objects, and class instances.
  • Non-ordinary containers such as functions, regular expressions, dates and standard library objects maintain the original runtime semantics.