title: why does javascript return -0
body: <p>I am trying to write a code that shows the last digit (in a set of 3) is the same. I could not understand why I got false for each set so, I decided to test -20%10 and I got -0 meanwhile 20%10 gives me the expected 0. What is this -0 about?</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>function last_digit( x, y, z){
  
  if(x % 10 == y % 10 == z % 10 ){
  return true;
  
  }else {
  return false;
  
  }
  
  }
  console.log(last_digit(20, 30, 400));
  console.log(last_digit(-20, 30, 400));
  console.log(last_digit(20, -30, 400));
  console.log(last_digit(20, 30, -400));</code></pre>
  </div>
  </div>
  </p>