UNPKG

@extra-array/right

Version:
51 lines (37 loc) 1.57 kB
Gets values from right. [:package:](https://www.npmjs.com/package/@extra-array/right) [:smiley_cat:](https://github.com/orgs/nodef/packages?repo_name=extra-array) [:running:](https://npm.runkit.com/@extra-array/right) [:vhs:](https://asciinema.org/a/332119) [:moon:](https://www.npmjs.com/package/@extra-array/right.min) [:scroll:](https://unpkg.com/@extra-array/right/) [:newspaper:](https://nodef.github.io/extra-array/) [:blue_book:](https://github.com/nodef/extra-array/wiki/) > Similar: [left], [middle], [right]. > This is part of package [extra-array]. [extra-array]: https://www.npmjs.com/package/extra-array <br> ```javascript array.right(x, [n]); // x: an array // n: number of values (1) ``` ```javascript const array = require("extra-array"); var x = [1, 2, 3]; array.right(x, 1); // [ 3 ] array.right(x, 2); // [ 2, 3 ] ``` <br> <br> ## References - [RIGHT$: QBasic 1.1](https://www.qbasic.net/en/reference/qb11/Function/RIGHT_.htm) - [Strings.Right: Visual Basic](https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.strings.right?view=netframework-4.8) - [Right: Visual Basic for Applications](https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/right-function) - [Data.List.tail: Haskell](https://hackage.haskell.org/package/base-4.12.0.0/docs/Data-List.html#v:tail) - [Array.from: sugarjs](https://sugarjs.com/docs/#/Array/from) [right]: https://github.com/nodef/extra-array/wiki/right [left]: https://github.com/nodef/extra-array/wiki/left [middle]: https://github.com/nodef/extra-array/wiki/middle