Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript Rest Parameter

let func = function(...args) {
    console.log(args);
}

func(3); // [3]
func(4, 5, 6); // [4, 5, 6]
Source by www.geeksforgeeks.org #
 
PREVIOUS NEXT
Tagged: #javascript #Rest #Parameter
ADD COMMENT
Topic
Name
3+6 =