From 58ba9f797bbd34e80c2e497561733b9875d4b476 Mon Sep 17 00:00:00 2001 From: caspringer Date: Fri, 14 Dec 2018 08:08:10 -0500 Subject: [PATCH] Improve/fix usage of bracket --- 1-js/06-advanced-functions/03-closure/article.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/1-js/06-advanced-functions/03-closure/article.md b/1-js/06-advanced-functions/03-closure/article.md index b50d7ce0..e6c95de0 100644 --- a/1-js/06-advanced-functions/03-closure/article.md +++ b/1-js/06-advanced-functions/03-closure/article.md @@ -475,7 +475,7 @@ They look like this: Here a Function Expression is created and immediately called. So the code executes right away and has its own private variables. -The Function Expression is wrapped with brackets `(function {...})`, because when JavaScript meets `"function"` in the main code flow, it understands it as the start of a Function Declaration. But a Function Declaration must have a name, so there will be an error: +The Function Expression is wrapped with parenthesis `(function {...})`, because when JavaScript meets `"function"` in the main code flow, it understands it as the start of a Function Declaration. But a Function Declaration must have a name, so there will be an error: ```js run // Error: Unexpected token ( @@ -497,7 +497,7 @@ function go() { }(); // <-- can't call Function Declaration immediately ``` -So, round brackets are needed to show JavaScript that the function is created in the context of another expression, and hence it's a Function Expression. It needs no name and can be called immediately. +So, parenthesis are needed to show JavaScript that the function is created in the context of another expression, and hence it's a Function Expression. It needs no name and can be called immediately. There are other ways to tell JavaScript that we mean Function Expression: