fjs.clone an array

fjs.clone

fjs.clone returns a copy of an array. Useful if you want to manipulate an array without modifying the original, such as with the native “reverse” function.

Usage

fjs.clone(items);

Example

fjs.clone([5, 4, 3, 2, 1]); // => [5, 4, 3, 2, 1]