es6 function arguments 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: parameters in javascript
function myFunction(x, y) {
if (y === undefined) {
y = 2;
}
}