Rest Parameters
Rest parameters (denoted by ...argumentName
for the last argument) allow you to quickly accept multiple arguments in your function and get them as an array. This is demonstrated in the below example.
Rest parameters can be used in any function be it function
/()=>
/class member
.
Last updated