I created an array called guestList and the first letter of each name is in uppercase. However, when in the prompt, I am typing the same name but all letters in lower case, I'm not getting the desired results as given in the code, despite changing the guest variable to (.toLowerCase();) .. how to fix it?
var guestList = ["Jack", "Jay", "Jim", "John", "Joseph"];
alert("HEL0000, thanks for dropping by. Click 'OKAY' to check if you're on the invite list!");
var guest = prompt("Enter your name here");
guest.toLowerCase();
if (guestList.includes(guest)) {
alert("Welcome to the party!! 14 Feb, 8PM, sharp");
}
else {
alert("Sorry, may be next time!")
}