📜  mdn Rest - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:32.150000             🧑  作者: Mango

代码示例1
function sum(...theArgs) {
  return theArgs.reduce((previous, current) => {
    return previous + current;
  });
}

console.log(sum(1, 2, 3));
// expected output: 6