I'm wondering how the some() method and arrow functions can be used to simplify my duplicate check in JavaScript. This is what I have at the moment (being used in a guessing game):
function guessRepeatValidate(userGuess) {
let passed = true;
if (guessArchive.indexOf(userGuess) > -1) {
passed = false;
}
return passed;
}
This has been puzzling me for a while, so it'd be great to see what you folks have in mind to make this work with some().