by aaronm67 · 11y ago · 0 comments
This all to save a fraction of a microsecond on an operation that's called 60 times on the page.
But yeah, I agree about googling part: I remember having Googled "tilde javascript" and "pipe javascript".. :)
Tilde is useful with indexOf:
if (~array.indexOf(item)) {}
..equals to:
if (array.indexOf(item) > -1) {}