When we see three dots (…) in the code, it’s either rest parameters or the spread operator . There’s an easy way to distinguish between them: When three dots (…) is at the end of function parameters, it’s “rest parameters” and gathers the rest of the list of arguments into an array.
What do three dots above and below code mean?
When we see three dots (…) in the code, it’s either rest parameters or the spread operator . There’s an easy way to distinguish between them: When three dots (…) is at the end of function parameters, it’s “rest parameters” and gathers the rest of the list of arguments into an array.