← BYTES
JavaScript·Starter·Ref: 3.1.14
What does the spread operator `...` do when used on an array, e.g. `[...arr]`?
Have a question about this video? Mention reference 3.1.14 when you contact us.
a.Expands the array's elements into a new array (a shallow copy) or into individual function arguments
b.Deletes every element of the array
c.Converts the array into a string
d.Reverses the array's order
`...arr` spreads an iterable's elements out individually, commonly used to make a shallow copy of an array (`[...arr]`), merge arrays (`[...a, ...b]`), or pass array elements as separate function arguments.
Find this on YouTube & Instagram
Every BYTES video is tagged with its reference number and topic — search any of these on YouTube or Instagram to find this one:
#BYTES#BYTES3114#JavaScript