@extra-array/left
Version:
Gets values from left.
51 lines (37 loc) • 1.56 kB
Markdown
Gets values from left.
[:package:](https://www.npmjs.com/package/@extra-array/left)
[:smiley_cat:](https://github.com/orgs/nodef/packages?repo_name=extra-array)
[:running:](https://npm.runkit.com/@extra-array/left)
[:vhs:](https://asciinema.org/a/332091)
[:moon:](https://www.npmjs.com/package/@extra-array/left.min)
[:scroll:](https://unpkg.com/@extra-array/left/)
[: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.left(x, [n]);
// x: an array
// n: number of values (1)
```
```javascript
const array = require("extra-array");
var x = [1, 2, 3];
array.left(x, 1);
// [ 1 ]
array.left(x, 2);
// [ 1, 2 ]
```
<br>
<br>
## 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)
[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