title: JS fill Object as an array
body: <p>can you tell me how to fill this element as an array</p>
  
  <pre><code>testdata = [
      {
          key: "one",
          y: 200
      },
      {
          key: "two",
          y: 300
      }
         ];
  </code></pre>
  
  <p>example: </p>
  
  <pre><code>testdata=[];
  testdata[]="one";
  testdata[]="two";
  </code></pre>