From 7c293b523e08e7ae880be90dbf804eaa18f08bf7 Mon Sep 17 00:00:00 2001 From: TylerGlenski <40610184+TylerGlenski@users.noreply.github.com> Date: Tue, 20 Aug 2019 06:26:41 -0700 Subject: [PATCH] added solution 2 to the article (#36639) --- .../index.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/guide/english/certifications/javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions/index.md b/guide/english/certifications/javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions/index.md index 5477bdb13c..05cca28506 100644 --- a/guide/english/certifications/javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions/index.md +++ b/guide/english/certifications/javascript-algorithms-and-data-structures/es6/use-arrow-functions-to-write-concise-anonymous-functions/index.md @@ -36,3 +36,11 @@ const magic = () => { As long as you got rid of the `var` keyword, you're good. + +
Solution 2 (Click to Show/Hide) + +```javascript +const magic = () => new Date(); +``` +Since there is only a return value, this can be written in one line. +