UNPKG

1.61 kBMarkdownView Raw
1Gets values from the right. [:running:] [:vhs:] [:package:] [:moon:] [:ledger:]
2> Alternatives: [right], [right$].<br>
3> Similar: [left], [middle], [right].<br>
4> This is part of package [extra-array].
5
6[extra-array]: https://www.npmjs.com/package/extra-array
7
8```javascript
9array.right$(x, [n]);
10// x: an array (updated)
11// n: number of values (1)
12// --> x
13```
14
15```javascript
16const array = require('extra-array');
17
18var x = [1, 2, 3];
19array.right$(x, 1);
20// [ 3 ]
21
22x;
23// [ 3 ]
24
25var x = [1, 2, 3];
26array.right$(x, 2);
27// [ 2, 3 ]
28```
29
30### references
31
32- [RIGHT$: QBasic 1.1](https://www.qbasic.net/en/reference/qb11/Function/RIGHT_.htm)
33- [Strings.Right: Visual Basic](https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.strings.right?view=netframework-4.8)
34- [Right: Visual Basic for Applications](https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/right-function)
35- [Data.List.tail: Haskell](https://hackage.haskell.org/package/base-4.12.0.0/docs/Data-List.html#v:tail)
36- [Array.from: sugarjs](https://sugarjs.com/docs/#/Array/from)
37
38[:running:]: https://npm.runkit.com/@extra-array/right-update
39[:package:]: https://www.npmjs.com/package/@extra-array/right-update
40[:moon:]: https://www.npmjs.com/package/@extra-array/right-update.min
41[:ledger:]: https://unpkg.com/@extra-array/right-update/
42[right]: https://github.com/nodef/extra-array/wiki/right
43[right$]: https://github.com/nodef/extra-array/wiki/right$
44[left]: https://github.com/nodef/extra-array/wiki/left
45[middle]: https://github.com/nodef/extra-array/wiki/middle
46[:vhs:]: https://asciinema.org/a/332118