So far I have this code:
var isMatch = viewedUserLikedUsersArray.indexOf(logged_in_user);
if (isMatch >=0){
console.log(\'is match\');
}
els
The One and Only ChemistryBlob answer with Array.prototype
Array.prototype.findMatch = function(token) {
var i = 0, count = this.length, matchFound = false;
for(; i < count; i++) {
if (this[i] === token) {
matchFound = true;
break;
}
}
return matchFound;
}
var isMatch = viewedUserLikedUsersArray.findMatch(logged_in_user); // etc.