Ray Rolls
Regular Member
- Dec 5, 2011
- 464
- 196
Any JavaScript masters out here can help me understand this
If I have a couple of objects in an array and I need to check if one of their properties have the same boolean value. How the hell would I pull that off?
Example:
const someArray = [{
title: "blah blah",
is_read: true
}, {
title: "yadda yadda",
is_read: true
}];
I thought I could use every() to check if is_read would be true but I'm not getting the desired result so I'm obviously doing something wrong.
Any help is appreciated as this is strictly for learning purposes.
If I have a couple of objects in an array and I need to check if one of their properties have the same boolean value. How the hell would I pull that off?
Example:
const someArray = [{
title: "blah blah",
is_read: true
}, {
title: "yadda yadda",
is_read: true
}];
I thought I could use every() to check if is_read would be true but I'm not getting the desired result so I'm obviously doing something wrong.
Any help is appreciated as this is strictly for learning purposes.