I started working with JavaScript last week in order to create some D3 visualizations, and have become rather stuck on what can only be a very simple task.
I have various data series for different countries, each stored in arrays, e.g.
var uk = [1,2,3,4,5,6,7,8],
us = [8,4,7,3,7,8,3,2],
fr = [4,6,8,3,2,6,8,4];
I want to create a master array, that contains all of these individual arrays, not concatenated/merged, so:
world = [uk, us, fr, etc]
How do I go about adding the arrays in such a manner so that they do not concatenate together? Note that there are hundreds of countries, and so I can't manually type them in, as above, and that I'm actually extracting them all from a single csv file, so can easily iterate over them as I extract them. Array.push seems to do the same as concat?
Thanks
var uk = [...]
?