Skip to content

Commit

Permalink
Docs: Minor fixes in no-new-func
Browse files Browse the repository at this point in the history
  • Loading branch information
brettz9 committed Mar 7, 2016
1 parent bb8f470 commit cc1f2f0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/rules/no-new-func.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ It's possible to create functions in JavaScript using the `Function` constructor
var x = new Function("a", "b", "return a + b");
```

This is considered by many to be a bad practice due to the difficult in debugging and reading these types of functions.
This is considered by many to be a bad practice due to the difficulty in debugging and reading these types of functions.

## Rule Details

This error is raised to highlight the use of a bad practice. By passing a string to the Function constructor, you are requiring the engine to parse that string much in the way it has to when you call the eval function.
This error is raised to highlight the use of a bad practice. By passing a string to the Function constructor, you are requiring the engine to parse that string much in the way it has to when you call the `eval` function.

```js
/*eslint no-new-func: 2*/
Expand Down

0 comments on commit cc1f2f0

Please sign in to comment.