127
rated 0 times
[
130]
[
3]
/ answers: 1 / hits: 5680
/ 11 Years ago, mon, december 16, 2013, 12:00:00
I'd like to check which elements are equal in my two arrays, but can't get it working.
This is my code:
for (var i; i < bombs.length; i++) {
for (var j; j < bombsDb.length; j++) {
if (bombs[i].name === bombsDb[j].address) {
console.log(bombs[i].name);
} else {
console.log(non-equal elements);
}
}
}
So the first array contains objects from the google places api and the second one contains data from my database.
Thanks in advance!
More From » jquery