3 ms·
var lst = [[1,2], [3,4], [5,6]]; for (var [a,b] of lst) { console.log(a + b); } You could write a `zip` function to merge multiple iterables together and i
by fnord123 10y ago
var lst = [[1,2], [3,4], [5,6]];
for (var [a,b] of lst) { console.log(a + b); }
You could write a `zip` function to merge multiple iterables together and iterator them. Or use something like `.enumerate()` to yield indices along with the values.