I tried to generate and array of arrays, beign the inner array elements the tuples from two other arrays.
Like:
xArray = [x1,x2,x3,x4...xn]
yArray = [y1,y2,y3,y4...yn]
And I need to get a generated array of the from:
points = [[x1,y1],[x2,y2],[x3,y3]...[xn,yn]]
I'm a bit aware of python expressions where you can generate an array assigning the values as an expression. But how could I do this in JavaScript?
Of course I had to go for a cycle:
for (var i = 0;i<xs.length;i++) {
var pt=[]
pt.push(xs[i])
pt.push(ys[i])
pts.push(pt)
}