Skip to content

Commit

Permalink
Docs: Update no-void.md (#6799)
Browse files Browse the repository at this point in the history
Small typo: is -> in; and commas
  • Loading branch information
dhritzkiv authored and platinumazure committed Jul 30, 2016
1 parent 5230310 commit 5ae0887
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions docs/rules/no-void.md
Expand Up @@ -16,7 +16,7 @@ The common case of using `void` operator is to get a "pure" `undefined` value as
return undefined;
})();

// will throw TypeError is ES5+
// will throw TypeError in ES5+
(function(){
'use strict';
undefined = 1;
Expand All @@ -30,7 +30,7 @@ foo = void 0;
foo = undefined;
```

When used with IIFE (immediately-invoked function expression) `void` can be used to force the function keyword to be treated as an expression instead of a declaration:
When used with IIFE (immediately-invoked function expression), `void` can be used to force the function keyword to be treated as an expression instead of a declaration:

```js
var foo = 1;
Expand All @@ -42,7 +42,7 @@ void function(){ foo = 1; }() // will assign foo a value of 1
function(){ foo = 1; }() // will throw SyntaxError
```

Some code styles prohibit `void` operator marking it as non-obvious and hard to read.
Some code styles prohibit `void` operator, marking it as non-obvious and hard to read.

## Rule Details

Expand Down

0 comments on commit 5ae0887

Please sign in to comment.