My friend is working on a fun Javascript web application where you type something in the text box, and the computer returns you a result, but it is case-sensitive. Can he make it case-insensitive? We have tried to use:
var areEqual = string1.toUpperCase() === string2.toUpperCase();
which was on JavaScript case insensitive string comparison, but he cannot figure out how to use that.
function isValid() {
var password = document.getElementById('password').value;
if (password == "Shut Up")
{ alert('HOW ABOUT YOU!') }
else if (password == "No")
{ alert('You just did') }
}