UNPKG

@stdlib/array

Version:
40 lines (28 loc) 773 B
{{alias}}( x, i0, i1, i2 ) Returns an element from a three-dimensional nested array. Negative indices are resolved relative to the last element along the respective dimension, with the last element corresponding to `-1`. If provided out-of-bounds indices, the function always returns `undefined`. Parameters ---------- x: ArrayLikeObject Input nested array. i0: integer First dimension index. i1: integer Second dimension index. i2: integer Third dimension index. Returns ------- out: any Element value. Examples -------- > var x = [ [ [ 1, 2 ], [ 3, 4 ] ] ]; > {{alias}}( x, 0, 0, 1 ) 2 > {{alias}}( x, 0, 1, 0 ) 3 See Also --------