Skip to content

Commit e458055

Browse files
authored
Merge pull request javascript-tutorial#780 from 11un/patch-11
change wording: "brackets" to "parentheses"
2 parents 758c3d6 + 07550ef commit e458055

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

1-js/06-advanced-functions/03-closure/article.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ function() { // <-- JavaScript cannot find function name, meets ( and gives erro
491491
We can say "okay, let it be so Function Declaration, let's add a name", but it won't work. JavaScript does not allow Function Declarations to be called immediately:
492492

493493
```js run
494-
// syntax error because of brackets below
494+
// syntax error because of parentheses below
495495
function go() {
496496

497497
}(); // <-- can't call Function Declaration immediately
@@ -505,11 +505,11 @@ There are other ways to tell JavaScript that we mean Function Expression:
505505
// Ways to create IIFE
506506

507507
(function() {
508-
alert("Brackets around the function");
508+
alert("Parentheses around the function");
509509
}*!*)*/!*();
510510

511511
(function() {
512-
alert("Brackets around the whole thing");
512+
alert("Parentheses around the whole thing");
513513
}()*!*)*/!*;
514514

515515
*!*!*/!*function() {

0 commit comments

Comments
 (0)