const allNames = ['Nathan', 'Clara ', 'Nathan', 'Fowler', 'Mitchell', 'Fowler', 'Clara ', 'Drake', 'Fowler', 'Clyde ', 'Mitchell', 'Clyde '];
function checkName(names) {
const uniqueName = [];
for (let i = 0; i < names.length; i++) {
const nameIndex = names[i];
if (uniqueName.includes(nameIndex) == false) {
uniqueName.push(nameIndex);
}
}
return uniqueName;
}
const uniqueNames = checkName(allNames);
console.log(uniqueNames);