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) {}
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) {}