1
0
mirror of https://github.com/jbranchaud/til synced 2026-01-04 23:58:01 +00:00

Merge pull request #40 from bortevik/patch-1

Little clean up
This commit is contained in:
Josh Branchaud
2017-09-13 09:19:19 -05:00
committed by GitHub

View File

@@ -14,7 +14,7 @@ That gives us `0` through `9`. To get `1` through `10`, we can tweak it
slightly:
```javascript
> Array.apply(null, {length: 10}).map(Number.call, n => { return Number(n) + 1 });
> Array.apply(null, {length: 10}).map(Number.call, n => Number(n) + 1);
=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
```
@@ -24,7 +24,7 @@ To generalize this, we can replace `10` with `N` and then just expect that
```javascript
> var N = 10;
=> undefined
> Array.apply(null, {length: N}).map(Number.call, n => { return Number(n) + 1 });
> Array.apply(null, {length: N}).map(Number.call, n => Number(n) + 1);
=> [1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
```