From ed1cdbd6e1cc68c252a4bdd32905c5bdba32e929 Mon Sep 17 00:00:00 2001 From: Stefan Date: Sun, 21 Oct 2018 07:35:33 +0100 Subject: [PATCH] Update index.md (#24174) Add New Syntax one line example --- guide/english/javascript/es6/arrow-functions/index.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/guide/english/javascript/es6/arrow-functions/index.md b/guide/english/javascript/es6/arrow-functions/index.md index c934f84582..5f71ae4da3 100644 --- a/guide/english/javascript/es6/arrow-functions/index.md +++ b/guide/english/javascript/es6/arrow-functions/index.md @@ -16,6 +16,9 @@ function oldOne() { const newOne = () => { console.log("Hello World..!"); } + +// Or on one line +const newOne = () => console.log("Hello World..!"); ``` The new syntax may be confusing a little bit. But I will try to explain the syntax.