Skip to content
Permalink
Browse files

Docs: language tweaks

  • Loading branch information...
mjomble committed Jan 21, 2016
1 parent 903b375 commit 69f149d57fea656f38cf6bcc2cf854a0fa1d546c
Showing with 5 additions and 5 deletions.
  1. +5 −5 docs/rules/prefer-rest-params.md
@@ -1,9 +1,9 @@
# Suggest using the rest parameters instead of `arguments` (prefer-rest-params)

There is rest parameters in ES2015.
We can use that feature for variadic functions instead of `arguments` variable.
There are rest parameters in ES2015.
We can use that feature for variadic functions instead of the `arguments` variable.

`arguments` does not have methods of `Array.prototype`, so it's inconvenience a bit.
`arguments` does not have methods of `Array.prototype`, so it's a bit of an inconvenience.

## Rule Details

@@ -22,15 +22,15 @@ function foo(action) {
}
```

The following patterns are considered not problems:
The following patterns are not considered problems:

```js
function foo(...args) {
console.log(args);
}
function foo(action, ...args) {
action.apply(null, args); // or `action(...args)`, related with the `prefer-spread` rule.
action.apply(null, args); // or `action(...args)`, related to the `prefer-spread` rule.
}
// Note: the implicit arguments can be overwritten.

0 comments on commit 69f149d

Please sign in to comment.
You can’t perform that action at this time.