Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

check object in array javascript

var obj = {a: 5};
var array = [obj, "string", 5]; // Must be same object
array.indexOf(obj) !== -1 // True
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #check #object #array #javascript
ADD COMMENT
Topic
Name
3+6 =