Site hosted by Angelfire.com: Build your free website today!
function getPassword () { thePasswords = new Array('foo','bar','bobo'); var passwordMatches = false; var enteredPassword = prompt ("Enter your password:"); for (i=0; i < thePasswords.length; i=i+1) { if (enteredPassword == thePasswords[i]) passwordMatches = true; } return passwordMatches; } var theVerdict = getPassword(); if(theVerdict == true) { alert("Right-O!") } else { alert("How much schooling did you say you had?"); }