Skip to content

Commit f7ddc6e

Browse files
authored
Figure bracket => curly brace
1 parent fa4c0d0 commit f7ddc6e

File tree

1 file changed

+6
-6
lines changed
  • 1-js/02-first-steps/15-function-expressions-arrows

1 file changed

+6
-6
lines changed

1-js/02-first-steps/15-function-expressions-arrows/article.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -299,7 +299,7 @@ if (age < 18) {
299299
}
300300
}
301301

302-
// Here we're out of figure brackets,
302+
// Here we're out of curly braces,
303303
// so we can not see Function Declarations made inside of them.
304304

305305
*!*
@@ -440,15 +440,15 @@ They are very convenient for simple one-line actions, when we're just too lazy t
440440
441441
The examples above took arguments from the left of `=>` and evaluated the right-side expression with them.
442442
443-
Sometimes we need something a little bit more complex, like multiple expressions or statements. It is also possible, but we should enclose them in figure brackets. Then use a normal `return` within them.
443+
Sometimes we need something a little bit more complex, like multiple expressions or statements. It is also possible, but we should enclose them in curly braces. Then use a normal `return` within them.
444444
445445
Like this:
446446
447447
```js run
448-
let sum = (a, b) => { // the figure bracket opens a multiline function
448+
let sum = (a, b) => { // the curly brace opens a multiline function
449449
let result = a + b;
450450
*!*
451-
return result; // if we use figure brackets, use return to get results
451+
return result; // if we use curly braces, use return to get results
452452
*/!*
453453
};
454454
@@ -476,5 +476,5 @@ So we should use a Function Expression only when a Function Declaration is not f
476476

477477
Arrow functions are handy for one-liners. They come in two flavors:
478478

479-
1. Without figure brackets: `(...args) => expression` -- the right side is an expression: the function evaluates it and returns the result.
480-
2. With figure brackets: `(...args) => { body }` -- brackets allow us to write multiple statements inside the function, but we need an explicit `return` to return something.
479+
1. Without curly braces: `(...args) => expression` -- the right side is an expression: the function evaluates it and returns the result.
480+
2. With curly braces: `(...args) => { body }` -- brackets allow us to write multiple statements inside the function, but we need an explicit `return` to return something.

0 commit comments

Comments
 (0)