1

The questions:
How do I check if an array includes an object in JavaScript? (Oct. 2008, ~1300 upvotes)
and
Determine whether an array contains a value (Jul. 2009, ~300 upvotes)
are very similar.

The first asks:

What is the most concise and efficient way to find out if a JavaScript array contains an obj?

While the second says:

i need to determine if a value exists in an array using javascript.

Both have the same kind of answers.

What should happen to them? Shall I close the second as a duplicate of the first? Should they be merged (as both contain high-quality answers)?

3
  • 1
    1 is about finding an object in an array, the other is about finding a value in an array. Keep them as they are. I'd say, those are different subjects. However, I noticed the "Object" one only has "value" answers... In that clase, close the object one.
    – Cerbrus
    Nov 19, 2014 at 8:15
  • @Cerbrus: An object is just a value.
    – Bergi
    Nov 19, 2014 at 10:42
  • I would advise to leave both of them to let someone plainly writes an answer that highlight the difference between "==" and "===". Nov 19, 2014 at 12:42

0

You must log in to answer this question.

Browse other questions tagged .