UNPKG

@extra-array/left-update

Version:
47 lines (37 loc) 1.59 kB
Gets values from the left. [:running:] [:vhs:] [:package:] [:moon:] [:ledger:] > Alternatives: [left], [left$].<br> > Similar: [left], [middle], [right].<br> > This is part of package [extra-array]. [extra-array]: https://www.npmjs.com/package/extra-array ```javascript array.left$(x, [n]); // x: an array (updated) // n: number of values (1) // --> x ``` ```javascript const array = require('extra-array'); var x = [1, 2, 3]; array.left$(x, 1); // [ 1 ] x; // [ 1 ] var x = [1, 2, 3]; array.left$(x, 2); // [ 1, 2 ] ``` ### references - [LEFT$: QBasic 1.1](https://www.qbasic.net/en/reference/qb11/Function/LEFT_.htm) - [Strings.Left: Visual Basic](https://docs.microsoft.com/en-us/dotnet/api/microsoft.visualbasic.strings.left?view=netframework-4.8) - [Left: Visual Basic for Applications](https://docs.microsoft.com/en-us/office/vba/language/reference/user-interface-help/left-function) - [Data.List.init: Haskell](https://hackage.haskell.org/package/base-4.12.0.0/docs/Data-List.html#v:init) - [Array.to: sugarjs](https://sugarjs.com/docs/#/Array/to) [:running:]: https://npm.runkit.com/@extra-array/left-update [:package:]: https://www.npmjs.com/package/@extra-array/left-update [:moon:]: https://www.npmjs.com/package/@extra-array/left-update.min [:ledger:]: https://unpkg.com/@extra-array/left-update/ [left]: https://github.com/nodef/extra-array/wiki/left [left$]: https://github.com/nodef/extra-array/wiki/left$ [middle]: https://github.com/nodef/extra-array/wiki/middle [right]: https://github.com/nodef/extra-array/wiki/right [:vhs:]: https://asciinema.org/a/332090