Hello class,

One of the most important thing in learning JavaScript is to learn If statements. There three types of If statements;
- If statement.
- If else statement.
- If else If statement.
We have to know that If statement will execute whether the condition is true or false except in the first situation when “If” is used without “else” then the program will evaluate the content only if the expression is true. On the other hand, “If else” statement checks if the first condition is true it executes that code. If the condition is false, the second code is executed. “Else if” statement after “If” statement will evaluate a second condition if the fist condition is false. Sometimes, it is confusing but fun to learn.
Leave a Reply
You must be logged in to post a comment.