UNPKG

@extra-array/right-update

Version:
47 lines (37 loc) 1.61 kB
Gets values from the right. [:running:] [:vhs:] [:package:] [:moon:] [:ledger:] > Alternatives: [right], [right$].<br> > Similar: [left], [middle], [right].<br> > This is part of package [extra-array]. [extra-array]: https://www.npmjs.com/package/extra-array ```javascript array.right$(x, [n]); // x: an array (updated) // n: number of values (1) // --> x ``` ```javascript const array = require('extra-array'); var x = [1, 2, 3]; array.right$(x, 1); // [ 3 ] x; // [ 3 ] var x = [1, 2, 3]; array.right$(x, 2); // [ 2, 3 ] ``` ### 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) [:running:]: https://npm.runkit.com/@extra-array/right-update [:package:]: https://www.npmjs.com/package/@extra-array/right-update [:moon:]: https://www.npmjs.com/package/@extra-array/right-update.min [:ledger:]: https://unpkg.com/@extra-array/right-update/ [right]: https://github.com/nodef/extra-array/wiki/right [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 [:vhs:]: https://asciinema.org/a/332118