Answers for "2 argument function that can be called with any number of parameters"

6

javascript multiply arguments

const mul = (...args) => args.reduce((a, b) => a * b);

// Example
mul(1, 2, 3, 4);    // 24
Posted by: Guest on July-03-2020

Code answers related to "2 argument function that can be called with any number of parameters"

Code answers related to "Javascript"

Browse Popular Code Answers by Language