title: Javascript, create an array from values
body: <p>I'm trying to emulate his:</p>
  
  <pre><code>"someArray" =&gt; array:3 [▼
      0 =&gt; "3"
      1 =&gt; "17"
      2 =&gt; "21"
    ]
  </code></pre>
  
  <p>But I'm getting:</p>
  
  <pre><code>  "myArray" =&gt; array:1 [▼
      0 =&gt; "3,17,21"
    ]
  </code></pre>
  
  <p>I'm doing: </p>
  
  <pre><code>var optionsChecked = [];
  optionsChecked.push($(this).val());
  console.log(optionsChecked);
  </code></pre>
  
  <p>I need to get what I write first</p>