Zusammenfassung der Ressource
Frage 1
Frage
A [blank_start]boolean[blank_end] expression can evaluate to one of two values: a true or a false.
Frage 2
Frage
Which of the following are examples of comparison operators?
Frage 3
Frage
Which of the following is the logical operator meaning `OR`?
Frage 4
Frage
If you want to include a catchall block of code that would run anytime your `if` condition did not pass, you would use an `else if` block.
Frage 5
Frage
What are some style best practices when it comes to if/else statements?
Antworten
-
Wrapping your condition in parentheses
-
Indenting the body of your if/else statement (the stuff between the {})
-
Ending your if/else statement with a semicolon
-
Putting your whole if/else statement on one line