Conditionals - Review

7 important questions on Conditionals - Review

What is the default control flow for statements to be read and executed?

  • Left-to-right
  • Top-to-bottom

What do control structures with the control flow?

Control structures such as conditionals (if) alter control flow by only executing blocks of code if certain conditions are met. These structures essentially allow a program to make decisions about which code is executed as the program runs

What is the function of the Ternary Operator?

It is a syntax to choose between two decisions. If the first condition evaluates to truthy, the first expression is executed, otherwise the second expression is executed
  • Higher grades + faster learning
  • Never study anything twice
  • 100% sure, 100% understanding
Discover Study Smart

What does the Logical AND operator && check?

Checks two values and returns boolean (true/false)
  • If both values truthy -> true
  • If  one, or both values falsy -> false

What is the function of a Switch Statement?

Checks an expression against multiple values. It first evaluates an expression. The result of the expression is matched against values in one or more case clauses. If a case matches, the code inside that clause is executed

How does an If Statement work?

  • If the expression is truthy -> the code will print
  • If the expression is falsy -> the code will not execute

What is the function of Comparison Operators? List the 6 of them

Compare two values and return true or false.
  • Strict equal ===
  • Strict not equal !==
  • Greater than >
  • Less than <
  • Greater than or equal >=
  • Less than or equal <=

The question on the page originate from the summary of the following study material:

  • A unique study and practice tool
  • Never study anything twice again
  • Get the grades you hope for
  • 100% sure, 100% understanding
Remember faster, study better. Scientifically proven.
Trustpilot Logo