diff --git a/Challenges/Week2/app.js b/Challenges/Week2/app.js index 146acc5..536570a 100644 --- a/Challenges/Week2/app.js +++ b/Challenges/Week2/app.js @@ -1,8 +1,35 @@ //create function - //control and return statements -//Prompt user for input and store variable + +//control and return statements + +function processInput(message) +{ + if(message === "hello!") + { + return("Hello World!"); + } + else { + + return("You Suck :("); + } +} + + + + +var userInput; + +userInput = prompt(); + + +var response = processInput(userInput); + +console.log(response); + //Call function + + //Alert user results diff --git a/Challenges/Week2/index.html b/Challenges/Week2/index.html index afe8e37..89ff39e 100644 --- a/Challenges/Week2/index.html +++ b/Challenges/Week2/index.html @@ -7,14 +7,14 @@

My first code challenge!

Try and do all of the following:

-
    +
+ - +