Spread vs Rest Operator in JavaScript β Explained Clearly
What is the Spread Operator?
π The spread operator (...) is used to expand elements
It takes a collection (array/object) and spreads it into individual values.
β
Example (Array)
const arr = [1, 2, 3
darshan-pawar.hashnode.dev3 min read