Web Client Programming
Kevin Martinez
11/01/16
I.T.H.S
The link I used to get more information and learn a little more about if...else statements are in w3schools(http://www.w3schools.com/js/js_if_else.asp). Once I was their I was reading the page to get more information about the if...else statements and what I got from reading that is that the if...else statements are used in JavaScript when you are going to write a code with a true or false question. For example I would say I am 15 years old but I'm not that would be a false statement so the code would work as follows since my first expression id is false then if would go to the next line of the statement and it would give you the correct answer. That's what the If...Else statements are used for. I also learned that If you write your if....else statements and you write the if or else part all cap letters you would get an error in your JavaScript, you would need to write it as lowercase letters if and else so your code would work.

No comments:
Post a Comment