How to remove duplicate output elements?

Tell me to do so when you click on "Add player" - has only added a new li
https://jsbin.com/denenugoto/edit?html,css,js,output
March 19th 20 at 09:03
1 answer
March 19th 20 at 09:05
Solution
addNewPlayer function() {
 if (players.includes(inputAdd.value)) {
return;
}

players.push(inputAdd.value);
 inputAdd.value = ";
renderNewPlayer();
}

renderNewPlayer function() {
 playersList.insertAdjacentHTML('beforeEnd', `<li>${players[players.length - 1]}</li>`);
}

Find more questions by tags Web DevelopmentJavaScript