Content deleted Content added
Ira Leviton (talk | contribs) m typeof->type of - Fix a typo in one click |
|||
Line 935:
var x = 17;
console.log((-x%5+5)%5); // displays 3
</syntaxhighlight>
You could also do:
<syntaxhighlight lang="javascript">
var x = 17;
console.log(Math.abs(-x%5)); // also 3
</syntaxhighlight>
|