Merge remote-tracking branch 'origin/master'
This commit is contained in:
@ -10,8 +10,8 @@ const nthArg = n => (...args) => args.slice(n)[0];
|
||||
|
||||
```js
|
||||
const third = nthArg(2);
|
||||
third(1,2,3); // 3
|
||||
third(1,2); // undefined
|
||||
third(1, 2, 3); // 3
|
||||
third(1, 2); // undefined
|
||||
const last = nthArg(-1);
|
||||
last(1,2,3,4,5); // 5
|
||||
last(1, 2, 3, 4, 5); // 5
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user