clone(): make an independent copy
clone(x) creates a copy of a value. It is most useful with arrays, matrices, and other mutable data where later changes must not alter the original object.
Why copying matters
In a calculation pipeline, reusing a matrix as working storage can unexpectedly change subsequent results. Clone the original before editing, then apply operations to the copy. For simple numbers, cloning has little visible effect because numbers are already value-like.
Matrix workflows
A common pattern is to clone a matrix, modify selected entries, and compare it to the source with compare(). Build or reshape data with matrixFromColumns(), extract a column(), or duplicate a structure with concat(). For a deep structural test, use deepEqual().
Practical expectation
clone() copies the value; it does not transform it or make an expression immutable forever. Use it before mutation, and verify the type you are copying when integrating with code that distinguishes arrays, matrices, and objects.