Skip to content

Instantly share code, notes, and snippets.

@gilbert
Last active February 23, 2016 16:57
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gilbert/657fdcdf0da2c354bb3a to your computer and use it in GitHub Desktop.
Save gilbert/657fdcdf0da2c354bb3a to your computer and use it in GitHub Desktop.

Exercise 1.1

Draw a diagram of the result of following code.

var businessName = "Trader Joe's";
var location     = "Austin";

Exercise 1.2

Draw a diagram of the result of following code.

var spy = "John Smith";
var nameTracker = spy;
spy = "James Bond";

Exercise 1.3

Draw a diagram of the result of following code. Take turns drawing it from scratch.

var x = 11;
var y = 22;

var temp = x;
x = y;
y = temp;

Exercise 2.1

Draw a diagram of the result of following code. Take turns drawing it from scratch.

var x = 11;

var increment = function (number) {
  number = number + 1;
}

increment(x);

Exercise 3

Draw a diagram of the result of the following code. Take turns drawing it from scratch.

var f = function (x, y) {
  var result = x * y;
  return result;
};
var sum = f(10, 20);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment