Monday, October 26, 2015

Lab #5

     In Lab #5 We had to use a function that would ask a question as an alert box and there would be two different options where after answering the question, another pop up would show and would either tell you two different things. For this lab we used a prompt and the if and else statements for all of it to work. We were able to ask any question we wanted and my question way "Do you watch Baseball?" With the if and else statements used in the code, if the user typed "yes" another pop up would display saying "Let's go Mets!!!!!!" If the user typed in anything other than "yes" There would be a pop up displaying the text "Watch the Mets!!!!!!" This was the over all goal of the lab and it was fun to play around with.

     This lab was confusing at first because I didn't know how the if and else statements worked and how to use them with code. We also used prompts which was new to me as well. This lab will be helpful for my future because now I know how to use prompts and have more experience with alerts. I now know how to use alerts better and can include them in my future labs and projects. I will be able to add it to my index and use it in many different ways.

No comments:

Post a Comment