title: Why is an array with a single number in it considered a number?
body: <p>While working on an <code>isNumeric</code> function I found this edge case:</p>
  
  <p><code>[5]</code> is considered a number, can be used with numerical operators like  <code>+</code>, <code>-</code>,<code>/</code> etc and gives <code>5</code> when given to <code>parseFloat</code>.</p>
  
  <p>Why does JavaScript convert a single value array to a number?</p>
  
  <p>For example</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false" data-console="true" data-babel="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>const x = [10];
  console.log(x - 5, typeof x);</code></pre>
  </div>
  </div>
  </p>
  
  <p>gives</p>
  
  <pre><code>5 object
  </code></pre>