Deprecate utility tag
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
---
|
||||
title: nthArg
|
||||
tags: utility,function,beginner
|
||||
tags: function,beginner
|
||||
---
|
||||
|
||||
Creates a function that gets the argument at index `n`. If `n` is negative, the nth argument from the end is returned.
|
||||
@ -17,4 +17,4 @@ third(1, 2, 3); // 3
|
||||
third(1, 2); // undefined
|
||||
const last = nthArg(-1);
|
||||
last(1, 2, 3, 4, 5); // 5
|
||||
```
|
||||
```
|
||||
|
||||
Reference in New Issue
Block a user