/ Published in: JavaScript
URL: clevermod
I have an array of numbers between 0 and 1, and I want to remove 0 and 1 from a for-each loop. Instead of if (x != 0 || x != 1) {}, this seems nicer:
Expand |
Embed | Plain Text
if (x%1 != 0) { // Do something }
You need to login to post a comment.
