find-if-an-item-is-in-a-javascript-array
http://stackoverflow.com/questions/143847/best-way-to-find-if-an-item-is-in-a-javascript-array
Best way to find if an item is in a JavaScript array? [duplicate]
This question already has an answer here: What is the best way to find if an object is in an array? This is the best way I know:
|
|||||||||||||||||
marked as duplicate by GothdoThis question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question. |
|||||||||||||||||
|
EDIT: This will not work on IE6, 7 or 8 though. The best workaround is to define it yourself if it's not present:
|