Using the if/else statements is probably the best way to create short cuts within a block that gives you different choices. The
if statement is to execute a condition that will turn out to be true. You have to make sure you use if in lower case letters, if not the computer will return an error. The
else statement is used along the
if statement, in case the
if statement returns false. The
else if statement is to specify a new condition if the first condition is false. And the
switch statement is to execute a specify alternative option.
No comments:
Post a Comment