Variables & Types

parsons exercises for Variables & Types from JS-Fundamentals
There are fewer exercises here than in other chapters since most of the action happens in memory (ie. sketches and python tutor).


menu

Value Swap: Logic

Construct a program that swaps the values of variables x and y using the helper variable tmp. You can change the names of the variables () by clicking them.

(This exercise is pulled directly from the examples in js-parson's GitHub repo)

Trash

Solution

New instance Get feedback


Value Swap: JavaScript

Place these lines of code in the correct order to swap values between variables a & b.
Study the step-through right here
(not all lines of code are part of the solution)

Re-Shuffle Get feedback


Hoisting

Place these lines of code in order so that the behavior comments are correct. Study the step-through right here

Re-Shuffle Get feedback