Tutorial JavaScript Array Contains

Javascript objects are really nice, but sometimes they are missing some useful little functions/methods. The example above is with Arrays. ...

Javascript objects are really nice, but sometimes they are missing some useful little functions/methods. The example above is with Arrays. It's really nice to know whether or not an item is contained within your array. Well you can write a function that takes the array and the item you're checking for, but it's much cleaner to add the contains( item ) method to the Array object.
Extending

Hot in Week

Popular

Archive

item