# @extra-array/last

> Gets last value.

Latest version **2.10.19** (published 2022-02-19) · MIT license · 0 weekly downloads

## Install

```sh
npm install @extra-array/last
pnpm add @extra-array/last
yarn add @extra-array/last
bun add @extra-array/last
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 2.10.19 |
| Published | 2022-02-19 |
| First published | 2018-09-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 17 |
| Author | wolfram77@gmail.com |
| Maintainers | wolfram77 |
| Keywords | extra, array, last |

## Links

- npm: https://www.npmjs.com/package/@extra-array/last
- Repository: https://github.com/nodef/extra-array
- Homepage: https://github.com/nodef/extra-array#readme
- Issues: https://github.com/nodef/extra-array/issues
- npm.io page: https://npm.io/package/@extra-array/last

## Recent versions

- 2.10.19 (latest) — 2022-02-19
- 2.10.18 — 2021-04-13
- 2.10.17 — 2021-02-05
- 2.10.16 — 2021-02-03
- 2.10.15 — 2021-02-03
- 2.10.14 — 2021-02-02
- 2.10.13 — 2021-02-02
- 2.10.12 — 2021-02-02
- 2.10.11 — 2021-02-02
- 2.10.10 — 2021-02-02
- 2.10.9 — 2020-12-16
- 2.10.8 — 2020-09-14
- 2.10.7 — 2020-06-29
- 2.10.6 — 2020-06-28
- 2.10.5 — 2020-06-28
- … 383 more at https://npm.io/package/@extra-array/last/versions

## README

Gets last value.
[:package:](https://www.npmjs.com/package/@extra-array/last)
[:smiley_cat:](https://github.com/orgs/nodef/packages?repo_name=extra-array)
[:running:](https://npm.runkit.com/@extra-array/last)
[:vhs:](https://asciinema.org/a/332088)
[:moon:](https://www.npmjs.com/package/@extra-array/last.min)
[:scroll:](https://unpkg.com/@extra-array/last/)
[:newspaper:](https://nodef.github.io/extra-array/)
[:blue_book:](https://github.com/nodef/extra-array/wiki/)

> Similar: [head], [tail], [init], [last].

> This is part of package [extra-array].

[extra-array]: https://www.npmjs.com/package/extra-array

<br>

```javascript
array.last(x, [vd]);
// x:  an array
// vd: default value
```

```javascript
const array = require("extra-array");

array.last([1, 2, 3]);
// 3

array.last([], -1);
// -1
```

<br>
<br>


## References

- [Data.List.last: Haskell](https://hackage.haskell.org/package/base-4.12.0.0/docs/Data-List.html#v:last)
- [_.last: lodash](https://lodash.com/docs/4.17.15#last)
- [Array.last: sugarjs](https://sugarjs.com/docs/#/Array/last)

[head]: https://github.com/nodef/extra-array/wiki/head
[tail]: https://github.com/nodef/extra-array/wiki/tail
[init]: https://github.com/nodef/extra-array/wiki/init
[last]: https://github.com/nodef/extra-array/wiki/last

---
_Source: https://npm.io/package/@extra-array/last · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
