You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: 1-js/02-first-steps/16-arrow-functions-basics/article.md
+6-2
Original file line number
Diff line number
Diff line change
@@ -86,15 +86,19 @@ Like this:
86
86
let sum = (a, b) => { // the curly brace opens a multiline function
87
87
let result = a + b;
88
88
*!*
89
-
return result; // if we use curly braces, use return to get results
89
+
return result; // if we use curly braces, then we need an explicit "return"
90
90
*/!*
91
91
};
92
92
93
93
alert( sum(1, 2) ); // 3
94
94
```
95
95
96
96
```smart header="More to come"
97
-
Here we praised arrow functions for brevity. But that's not all! Arrow functions have other interesting features. We'll return to them later in the chapter <info:arrow-functions>.
97
+
Here we praised arrow functions for brevity. But that's not all!
98
+
99
+
Arrow functions have other interesting features.
100
+
101
+
To study them in-depth, we first need to get to know some other aspects of JavaScript, so we'll return to arrow functions later in the chapter <info:arrow-functions>.
98
102
99
103
For now, we can already use arrow functions for one-line actions and callbacks.
0 commit comments