text: Q:
  
  Issue with multi-dimensional arrays in JavaScript
  
  I am trying to create a multidimensional array in javascript. 
  The following code generates the following error: 0x800a138f - JavaScript runtime error: Unable to set property '0' of undefined or null reference
  
  var data = [["Timestamp", "kWh Produced", "kWh Used"]];
  
  data[1][0] = "test";
  
  I assume that I need to somehow "pre-allocate" the array so it knows that it is multi-dimensional.
  I will be filling this array in one row at a time in a for loop if that makes anything simpler.
  How do I do this?
  
  A:
  
  As your log indicates, data[1] is undefined.
  There are a number of ways to define the values of data[0–99] as empty arrays. In es6 for instance, Array(100).fill([]). See https://stackoverflow.com/a/41246860/1664393.
  
  