Skip to content

Commit

Permalink
example-bad
Browse files Browse the repository at this point in the history
  • Loading branch information
kirkwaiblinger committed Sep 12, 2024
1 parent a52797e commit 432eacf
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ This is a bit longer than wrapping the function expression in parentheses, which

Note that this trick only applies to immediately-invoked functions defined with the `function` keyword. Attempting to use the `void` operator to avoid parentheses for an arrow function results in a syntax error.

```js
```js example-bad
void () => { console.log('iife!'); }(); // SyntaxError: Malformed arrow function parameter list
```

Expand Down

0 comments on commit 432eacf

Please sign in to comment.