because your array is like
[ "name1,score1", "name2,score2"]
searching for "name1" using includes wont work
you'll want something like
if (!array.some(item => item.split(',')[0] === name)) {
alert(name + " is not in record.")
}
or in pre ES2015
if (!array.some(function (item) {
return item.split(',')[0] === name;
})) {
alert(name + " is not in record.");
}
or if your browser doesn't have Array.prototype.some
if (array.filter(function (item) {
return item.split(',')[0] === name;
}).length === 0) {
alert(name + " is not in record.");
}