@extra-array/get-all
Version:
Gets values at indices.
50 lines (36 loc) • 1.32 kB
Markdown
Gets values at indices.
[:package:](https://www.npmjs.com/package/@extra-array/get-all)
[:smiley_cat:](https://github.com/orgs/nodef/packages?repo_name=extra-array)
[:running:](https://npm.runkit.com/@extra-array/get-all)
[:vhs:](https://asciinema.org/a/332059)
[:moon:](https://www.npmjs.com/package/@extra-array/get-all.min)
[:scroll:](https://unpkg.com/@extra-array/get-all/)
[:newspaper:](https://nodef.github.io/extra-array/)
[:blue_book:](https://github.com/nodef/extra-array/wiki/)
> Alternatives: [get], [getAll], [getPath].<br>
> Similar: [get], [set], [remove].
> This is part of package [extra-array].
[extra-array]: https://www.npmjs.com/package/extra-array
<br>
```javascript
array.getAll(x, is);
// x: an array
// is: indices
```
```javascript
const array = require("extra-array");
var x = [2, 4, 6, 8];
array.getAll(x, [1, 2]);
// [ 4, 6 ]
array.getAll(x, [1, 3]);
// [ 4, 8 ]
```
<br>
<br>
## References
- [ArrayList.get: Java](https://docs.oracle.com/javase/7/docs/api/java/util/ArrayList.html#get(int))
[get]: https://github.com/nodef/extra-array/wiki/get
[getAll]: https://github.com/nodef/extra-array/wiki/getAll
[set]: https://github.com/nodef/extra-array/wiki/set
[remove]: https://github.com/nodef/extra-array/wiki/remove
[getPath]: https://github.com/nodef/extra-array/wiki/getPath