use castArray instead
Converts a value or an array of values to an array.
toArray(1) // => [1]toArray([1, 2]) // => [1, 2] Copy
toArray(1) // => [1]toArray([1, 2]) // => [1, 2]
Deprecated
use castArray instead
Description
Converts a value or an array of values to an array.
Example