🔰spread operator (...)
[...iterable], {...obj}, f(...iterable).
Last updated
[...iterable], {...obj}, f(...iterable).
Last updated
JS ⟩ statement ⟩ expression ⟩ operator ⟩ spread
adds all enumerable own properties of an object to an object literal.
spread operator (...) is not a true operator, it cannot be evaluated to produce a value ( table of operators)
...obj only spreads enumerable own properties, 👉 property enumeration.
can be used to assign default values instead of using Object.assign().
spread operator (...)
can be used in an array literal.
"spreads out" an iterable into array elements or function arguments.
punctuators used: 3 dots (...)