in Javascript i want the action is if i put character on the prompt some name(full lowercase/full Uppercase/mixed case ) i can't access the array with desired input.
i only can access with exact typing. i want to access the array with mixing case / usuval typing like lower case
var name = prompt('enter your name');
var nameList = ["Jennifer","Johnson","Natalie","Robinson","John","Ferguson","Samuel","Patterson"];
if (nameList.includes(name)){
alert('Hi you can enter');
} else {
alert("You can't enter");
}
thank you