added solution 2 to the article (#36639)
This commit is contained in:
committed by
Randell Dawson
parent
1348a5a037
commit
7c293b523e
@ -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>
|
||||
|
Reference in New Issue
Block a user