Software dev at Netflix | DC techie | Conference speaker | egghead Instructor | TC39 Educators Committee | Girls Who Code Facilitator | Board game geek | @laurieontech on twitter
However, the "infinite" number of arguments use case is not handled unless the arguments in question are already in an object and their key names are known. It's a very different piece of syntax.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Out of curiosity, why are you choosing to use
over
?
Is there any technical differences or is this just syntactical preference?
The first example is using the rest parameter, which is what the article is meant to explain.
The second example would not apply for the example above since it's only passing integers. It would work if the example looked like this though.
However, the "infinite" number of arguments use case is not handled unless the arguments in question are already in an object and their key names are known. It's a very different piece of syntax.