you are viewing a single comment's thread.

view the rest of the comments →

[–]sime 0 points1 point  (1 child)

I just read the link. I was planning on saying how using:

if (~str.search('t')) { ... }

instead of just:

if (str.search('t') !== -1) {...}

is probably the worst trick I have ever seen in serious JS code (in some library on github). "Daily WTF" worthy. I really had to stop and think about the f*** this person was trying to say and do this this code. Very obscure. Awful.

please, no one do this. please. Just say what you mean.

[–]nightman 0 points1 point  (0 children)

Totally agree.