jskatas.org Continuously Learn JavaScript. Your Way.

Rest operator: as parameter

Use the rest operator as parameter.

Donate to NGO Julenka. Support Ukranians in need. Julenka is an NGO which my brother founded in 2011 to support Ukranian families and kids in need.

Rest parameters in functions

  • must be the last parameter
  • can be used to get all other parameters
  • makes arguments obsolete
  • eliminate arguments!!!