Skip to content

Commit b6f84d0

Browse files
authored
Update 14-ES6ParameterHandling.js
1 parent 5d9f8c6 commit b6f84d0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

chapter01/14-ES6ParameterHandling.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,8 @@ function restParamaterFunction (x, y, ...a) {
3030
console.log(restParamaterFunction(1, 2, "hello", true, 7)); // outputs 9;
3131

3232
//code above is the same as ES5:
33-
function restParamaterFunction (x, y) {
33+
function restParamaterFunction2 (x, y) {
3434
var a = Array.prototype.slice.call(arguments, 2);
3535
return (x + y) * a.length;
3636
};
37-
console.log(restParamaterFunction2(1, 2, "hello", true, 7));
37+
console.log(restParamaterFunction2(1, 2, "hello", true, 7));

0 commit comments

Comments
 (0)