title: Can javascript add element to an array without specifiy the key like PHP?
body: <p>In PHP , I can add a value to the array like this:</p>
  
  <pre><code>array[]=1;
  array[]=2;
  </code></pre>
  
  <p>and the output will be <code>0=&gt;'1', 1=&gt;'2';</code></p>
  
  <p>And if I tried the same code in javascript , it return <em>Uncaught SyntaxError: Unexpected string</em> . So , is there any way in JS to work the same as PHP? Thanks</p>