Answers for "defoult function atributes"

0

defoult function atributes

function multiply(a, b = 1) {
  return a * b;
}

console.log(multiply(5, 2));
// expected output: 10

console.log(multiply(5));
// expected output: 5
Posted by: Guest on December-16-2020

Code answers related to "Javascript"

Browse Popular Code Answers by Language