Rest Parameters in JavaScript Functions

In this lab, you will learn how to use rest parameters in JavaScript functions. Rest parameters are useful when you want to accept an arbitrary number of arguments in a function. They are represented by three dots (...) followed by the name of the array that will hold the values.

Your task is to create a sumAll function that accepts rest parameters and calculates the sum of all passed numbers. Make sure to export the function to run the tests. The lab uses ESM exports

NOTE: Rest Paramenters are not to be confused with Spread Operator they are different functionalities that share the same syntax.

Adding your container request
Getting your dedicated container
Connecting to your container
Setting up your editor
Finalizing your playground
TerminalEditorBrowser