diff --git a/starter-code/index.html b/starter-code/index.html index eed6a96..d9a70d5 100644 --- a/starter-code/index.html +++ b/starter-code/index.html @@ -13,7 +13,7 @@ - + diff --git a/starter-code/login.js b/starter-code/login.js index 3ec61ba..9f5122f 100644 --- a/starter-code/login.js +++ b/starter-code/login.js @@ -1 +1,12 @@ console.log("login.js loaded"); + +let userLogin = { + userName: "Robot", + userPassword: "123" +}; + +var login = prompt("Enter password for user Robot."); + +if (login === userLogin.userPassword) { + alert('Welcome Mr. Roboto'); +} else (alert('You are not Mr. Robot!')); diff --git a/starter-code/security_questions.js b/starter-code/security_questions.js index 03606fe..bfafbe2 100644 --- a/starter-code/security_questions.js +++ b/starter-code/security_questions.js @@ -1 +1,19 @@ console.log("security_questions.js loaded"); + +let securityQuestions = [ + {question1: "What is fun?" , expectedAnswer1: "Fun is fun."}, + {question2: "Who are you?" , expectedAnswer2: "I am Superuser."}, + {question3: "What is the password?", expectedAnswer3: "Coconuts."}, +]; + +var q1 = prompt(securityQuestions[0].question1); + +if (q1 === securityQuestions[0].expectedAnswer1) { + var q2 = prompt(securityQuestions[1].question2); +} + if (q2 === securityQuestions[1].expectedAnswer2) { + var q3 = prompt(securityQuestions[2].question3); +} + if (q3 === securityQuestions[2].expectedAnswer3) { +} + else (alert("You are a fake!"));; diff --git a/starter-code/sing.js b/starter-code/sing.js index c656175..a697596 100644 --- a/starter-code/sing.js +++ b/starter-code/sing.js @@ -1 +1,10 @@ console.log("sing.js loaded"); + +let beerSong = [ + {line1: "5 bottles of beer on the wall, "}, + {line2: "5 bottles of beer! "}, + {line3: "Take one down and pass it around, "}, + {line4: "4 bottles of beer on the wall!"}, +]; + +console.log(beerSong);