title: JavaScript - conversion of "0" to number
body: <p>I can understand why  </p>
  
  <p><code>10 % "test"</code></p>
  
  <p>returns <code>NaN</code>... because "test" is converted to a number first which gives <code>NaN</code> and then any subsequent arithmetic operation involving <code>NaN</code> results in <code>NaN</code> too.   </p>
  
  <p>But why does  </p>
  
  <pre><code>    10 % "0"
  </code></pre>
  
  <p>return <code>NaN</code> ?  </p>
  
  <p><code>"0"</code> is usually converted to a number as <code>0</code> e.g. in <code>1 * "0"</code>.  </p>
  
  <p>If I try <code>10 / "0"</code> this gives <code>Infinity</code> which also makes sense.   </p>
  
  <p>So... why does that expression <code>10 % "0"</code> return <code>NaN</code> ?! Any logic behind this?    </p>