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. ...
https://iskablogs.blogspot.com/2014/03/tutorial-javascript-array-contains.html
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
Extending