repl.txt (665B)
1 2 {{alias}}( arr[, idx] ) 3 Unzips a zipped array (i.e., a nested array of tuples). 4 5 Parameters 6 ---------- 7 arr: Array 8 Zipped array. 9 10 idx: Array<number> (optional) 11 Array of indices specifying which tuple elements to unzip. 12 13 Returns 14 ------- 15 out: Array 16 Array of unzipped arrays. 17 18 Examples 19 -------- 20 // Basic usage: 21 > var arr = [ [ 1, 'a', 3 ], [ 2, 'b', 4 ] ]; 22 > var out = {{alias}}( arr ) 23 [ [ 1, 2 ], [ 'a', 'b' ], [ 3, 4 ] ] 24 25 // Provide indices: 26 > arr = [ [ 1, 'a', 3 ], [ 2, 'b', 4 ] ]; 27 > out = {{alias}}( arr, [ 0, 2 ] ) 28 [ [ 1, 2 ], [ 3, 4 ] ] 29 30 See Also 31 -------- 32