Scope & Control Flow

parsons exercises for Scope & Control Flow from JS-Fundamentals

menu


Let vs. Var

This example illustrates how let & var behave differently with block scoping.
You can study this example in more detail by following the guided step-through right here.

Re-Shuffle Get feedback



Nesting Scopes

This example illustrates how JavaScript implements "let" with nested block scopes.
You can study this example in more detail by following the guided step-through right here.

Re-Shuffle Get feedback



If, Else If, Else

A basic conditional statement.
You can study this example in more detail by following the guided step-through right here.

Re-Shuffle Get feedback



Switch/Case

The switch/case structure. Sort of a trickier and more risky version of if/else.
You can study this example in more detail by following the guided step-through right here.

Re-Shuffle Get feedback



While Loop

A basic while loop.
You can study this example in more detail by following the guided step-through right here.

Re-Shuffle Get feedback



Do While Loop

A basic do while loop.
You can study this example in more detail by following the guided step-through right here.

Re-Shuffle Get feedback



For Loop with "var"

A basic for loop with the stepper declared using "var".
You can study this example in more detail by following the guided step-through right here.

Re-Shuffle Get feedback



Simulated For Loop with "var"

The execution behavior of a for loop with "var", simulated using a while loop.
You can study this example in more detail by following the guided step-through right here.

Re-Shuffle Get feedback



For Loop with "let"

A basic for loop with the stepper declared using "let".
You can study this example in more detail by following the guided step-through right here.

Re-Shuffle Get feedback



Simulated For Loop with "let"

The execution behavior of a for loop with "let", simulated using a while loop.
You can study this example in more detail by following the guided step-through right here.

Re-Shuffle Get feedback