/ Published in: JavaScript
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 <code>if (x != 0 || x != 1) {}</code>, this seems nicer:
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
if (x%1 != 0) { // Do something }
URL: clevermod