Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript rest parameter

function show(a, b, ...args) {
  console.log(a); // one
  console.log(b); // two
  console.log(args); // ["three", "four", "five", "six"]
}

show('one', 'two', 'three', 'four', 'five', 'six')
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #javascript #rest #parameter
ADD COMMENT
Topic
Name
7+2 =