Update 15-function-expressions-arrows
'Must' is very restrictive. The code would work without `return` directive, both in general or `"use strict";` modes. For instance, we **must** declare variables, because code would break.
This commit is contained in:
parent
25e97bb50e
commit
e3f126edaf
1 changed files with 1 additions and 1 deletions
|
@ -450,7 +450,7 @@ Like this:
|
||||||
let sum = (a, b) => { // the figure bracket opens a multiline function
|
let sum = (a, b) => { // the figure bracket opens a multiline function
|
||||||
let result = a + b;
|
let result = a + b;
|
||||||
*!*
|
*!*
|
||||||
return result; // if we use figure brackets, must use return
|
return result; // if we use figure brackets, use return to get results
|
||||||
*/!*
|
*/!*
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue