I have a JavaScript array, where each new item added to the array gets the next incremental number. An example would be as follows (I hope Im writing this correctly):
function IsIdInArray(array, id) {
for (var i = 0; i < array.length; i++) {
if (array[i].id === id)
return true;
}
return false;
}
var result = IsIdInArray(ArrayofPeople, 820);