Skip to content
Subhajit Sahu edited this page Mar 14, 2020 · 29 revisions

Flattens nested array to given depth.

array.get(x, i);
// x: a nested array
// i: index (-ve: from right)
// --> value
const array = require('extra-array');

var a = [2, 4, 6, 8];
array.get(a, 0);
// 2

array.get(a, 1);
// 4

array.get(a, -1);
// 8

references

Clone this wiki locally