title: Get the absolute value of a number in Javascript
body: <p>I want to get the absolute value of a number in JavaScript. That is, drop the sign.
  I know mathematically I can do this by squaring the number then taking the square root, but I also know that this is horribly inefficient.</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>x = -25
  x = x * x 
  x = Math.sqrt(x)
  console.log(x)</code></pre>
  </div>
  </div>
  </p>
  <p>Is there a way in JavaScript to simply drop the sign of a number that is more efficient than the mathematical approach?</p>