From 2aedc2df492721f5aa1d40d266aade87eea4264b Mon Sep 17 00:00:00 2001 From: Ilya Kantor Date: Wed, 6 Nov 2019 14:52:58 +0300 Subject: [PATCH] refactor arrow functions --- 1-js/02-first-steps/16-arrow-functions-basics/article.md | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/1-js/02-first-steps/16-arrow-functions-basics/article.md b/1-js/02-first-steps/16-arrow-functions-basics/article.md index b0086873..02090f3c 100644 --- a/1-js/02-first-steps/16-arrow-functions-basics/article.md +++ b/1-js/02-first-steps/16-arrow-functions-basics/article.md @@ -86,7 +86,7 @@ Like this: let sum = (a, b) => { // the curly brace opens a multiline function let result = a + b; *!* - return result; // if we use curly braces, use return to get results + return result; // if we use curly braces, then we need an explicit "return" */!* }; @@ -94,7 +94,11 @@ alert( sum(1, 2) ); // 3 ``` ```smart header="More to come" -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 . +Here we praised arrow functions for brevity. But that's not all! + +Arrow functions have other interesting features. + +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 . For now, we can already use arrow functions for one-line actions and callbacks. ```