added solution 2 to the article (#36639)

This commit is contained in:
TylerGlenski
2019-08-20 06:26:41 -07:00
committed by Randell Dawson
parent 1348a5a037
commit 7c293b523e

View File

@ -36,3 +36,11 @@ const magic = () => {
As long as you got rid of the `var` keyword, you're good.
</details>
<details><summary>Solution 2 (Click to Show/Hide)</summary>
```javascript
const magic = () => new Date();
```
Since there is only a return value, this can be written in one line.
</details>