Ensures that the returned value is an array.
If the given value is an array, it is returned as-is. Otherwise, the given value is wrapped in an array.
castArray(1); // [1]castArray([1]); // [1] Copy
castArray(1); // [1]castArray([1]); // [1]
Ensures that the returned value is an array.
If the given value is an array, it is returned as-is. Otherwise, the given value is wrapped in an array.
Example