Handy little for … in test

Quick and easy:

 if(fileType in {'jpg':'','gif':'','bmp':''}){ ... }

Create the Object you’re testing against on the fly. Seems that Object creation trumps in in the order of operations (at least in Firefox 3.0).

Leave a Reply

I'm Reading…
Search This Site

AddThis Feed Button

Need great hosting?

Categories