Content deleted Content added
In JavaScript - Change the second example to be more in line with the first |
In JavaScript - wording and indentation |
||
Line 210:
</syntaxhighlight>
It's also possible to create a variadic function using the arguments object,
<syntaxhighlight lang="javascript">
function sum() {
return Array.prototype.reduce.call(arguments, (a, b) => a + b, 0);
}
|