SyntaxFix
Write A Post
Hire A Developer
Questions
Use the map method:
map
var a = [1, 2, 3]_x000D_ var b = ['a', 'b', 'c']_x000D_ _x000D_ var c = a.map(function(e, i) {_x000D_ return [e, b[i]];_x000D_ });_x000D_ _x000D_ console.log(c)
DEMO