Skip to content

Commit

Permalink
修订JavaScript深入之call和apply的模拟实现
Browse files Browse the repository at this point in the history
  • Loading branch information
mqyqingfeng committed Sep 4, 2017
1 parent 43c1dcf commit 5cde7b5
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,7 @@ for(var i = 1, len = arguments.length; i < len; i++) {
args.push('arguments[' + i + ']');
}

// 执行后 args为 [foo, 'kevin', 18]
// 执行后 args为 ["arguments[1]", "arguments[2]", "arguments[3]"]
```

不定长的参数问题解决了,我们接着要把这个参数数组放到要执行的函数的参数里面去。
Expand Down

0 comments on commit 5cde7b5

Please sign in to comment.