Skip to content

Commit

Permalink
Update arguments.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Kikobeats committed Mar 30, 2017
1 parent 6638520 commit ff97263
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions array/arguments.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,5 @@ Only use:
* Never use `arguments` directly without `.length` or `[i]`.
* STRICTLY `fn.apply(y, arguments)` is ok, nothing else is, e.g. `.slice`, That's because `Function#apply` is special.
* Be aware that adding properties to functions (e.g. `fn.$inject =...`) and bound functions (i.e. the result of `Function#bind`) generate hidden classes and, therefore, are not safe when using `.apply`.

If you need to manipulate `arguments`, use a copy. [sliced](https://github.com/aheckmann/sliced) is a good tiny library for this purpose.

0 comments on commit ff97263

Please sign in to comment.