Skip to content
Permalink
Browse files

Docs: Update no-void.md (#6799)

Small typo: is -> in; and commas
  • Loading branch information...
dhritzkiv authored and platinumazure committed Jul 30, 2016
1 parent 5230310 commit 5ae088700a14f7b292f37f2c0257490e0a74bc7c
Showing with 3 additions and 3 deletions.
  1. +3 −3 docs/rules/no-void.md
@@ -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;
@@ -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;
@@ -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

0 comments on commit 5ae0887

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