title: Is there a condition where the Math.ceil function in Javascript doesn't remove decimals from the output?
body: <p>Is there a reason why some Javascript programmers use the following syntax to remove decimals?</p>
  <pre><code>Math.ceil(averageCost / 10) * 10;
  </code></pre>
  <p>Why wouldn't we just use Math.ceil? Doesn't it effectively do the same thing as the above? Is there a condition where Math.ceil doesn't work?</p>
  <p>Initially I thought maybe this would eliminate string cases and return a zero, but in the following code, the results are NaN -</p>
  <pre><code>var name = &quot;Gary&quot;;
  console.log(Math.ceil(name / 10)); // NaN
  console.log(Math.ceil(name)); // NaN
  </code></pre>
  <p>So I'm at a loss for why I'd see a division by 10 with a subsequent multiplication of 10.</p>