javascript 1 parameters function es6 code example
Example 1: javascript multiply arguments
const mul = (...args) => args.reduce((a, b) => a * b);
// Example
mul(1, 2, 3, 4); // 24
Example 2: js unspecified parameters
function my_log(...args) {
// args is an Array
console.log(args);
// You can pass this array as parameters to another function
console.log(...args);
}