Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 3
    Too bad community up-voting couldn't five years later result in something being marked as the right answer. :) Commented Feb 22, 2016 at 23:18
  • They should be marking the correct answers themselves by looking at the up votes after x amount of time Commented Jan 21, 2017 at 22:31
  • 5
    Actually $.inArray performs a === instead of ==. So if you do $.inArray( "4", [1,2,3,4]) you will get -1 Commented Mar 2, 2017 at 9:46