What number would be displayed by this code? ]]> ]]> ]]> ]]> ]]> ]]> WHAT ORDER ARE STATEMENTS EXECUTED IN? function tryMe(num1, num2) { var x, y, z; // what’s in x, y, and z? // what should we look out for?! x = num1; y = num2; x = y; z = x + y; z = z + 1; return z; } alert( tryMe(3, 4) ); ]]> First the "tryMe" function declaration. Then each statement of tryMe's body from top to bottom. Finally the alert function call. ]]> First the "tryMe" function declaration. Then the alert function call (and the tryMe function call inside it), which causes each statement in tryMe's body to execute from top to bottom. ]]> First the "tryMe" function declaration. Then each statement of tryMe's body from top to bottom. Then the alert function call (and the tryMe function call inside it), which causes each statement in tryMe's body to execute from top to bottom. ]]> First the first statement of tryMe's body (var x, y, z;) and then on down to the bottom of tryMe. ]]> ]]> WHAT IS THE VALUE OF "x" AFTER "var x, y, z;"? function tryMe(num1, num2) { var x, y, z; // what’s in x, y, and z? // what should we look out for?! x = num1; y = num2; x = y; z = x + y; z = z + 1; return z; } alert( tryMe(3, 4) ); ]]> ]]> ]]> ]]> ]]> ]]> WHAT IS THE VALUE OF "x" AFTER "x = num1;"? function tryMe(num1, num2) { var x, y, z; // what’s in x, y, and z? // what should we look out for?! x = num1; y = num2; x = y; z = x + y; z = z + 1; return z; } alert( tryMe(3, 4) ); ]]> ]]> ]]> ]]> ]]> ]]> WHAT IS THE VALUE OF "num1" AFTER "x = num1;"? function tryMe(num1, num2) { var x, y, z; // what’s in x, y, and z? // what should we look out for?! x = num1; y = num2; x = y; z = x + y; z = z + 1; return z; } alert( tryMe(3, 4) ); ]]> ]]> ]]> ]]> ]]> ]]> WHAT IS THE VALUE OF "y" AFTER "y = num2;"? function tryMe(num1, num2) { var x, y, z; // what’s in x, y, and z? // what should we look out for?! x = num1; y = num2; x = y; z = x + y; z = z + 1; return z; } alert( tryMe(3, 4) ); ]]> ]]> ]]> ]]> ]]> ]]> WHAT IS THE VALUE OF "x" AFTER "x = y;"? function tryMe(num1, num2) { var x, y, z; // what’s in x, y, and z? // what should we look out for?! x = num1; y = num2; x = y; z = x + y; z = z + 1; return z; } alert( tryMe(3, 4) ); ]]> ]]> ]]> ]]> ]]> ]]> WHAT IS THE VALUE OF "y" AFTER "x = y;"? function tryMe(num1, num2) { var x, y, z; // what’s in x, y, and z? // what should we look out for?! x = num1; y = num2; x = y; z = x + y; z = z + 1; return z; } alert( tryMe(3, 4) ); ]]> ]]> ]]> ]]> ]]> ]]> WHAT IS THE VALUE OF "z" AFTER "z = x + y;"? function tryMe(num1, num2) { var x, y, z; // what’s in x, y, and z? // what should we look out for?! x = num1; y = num2; x = y; z = x + y; z = z + 1; return z; } alert( tryMe(3, 4) ); ]]> ]]> ]]> ]]> ]]> ]]> WHAT IS THE VALUE OF "z" AFTER "z = z + 1;"? function tryMe(num1, num2) { var x, y, z; // what’s in x, y, and z? // what should we look out for?! x = num1; y = num2; x = y; z = x + y; z = z + 1; return z; } alert( tryMe(3, 4) ); ]]> ]]> ]]> ]]> ]]> ]]> WHAT DOES THIS CODE DISPLAY WHEN IT IS RUN? function tryMe(num1, num2) { var x, y, z; // what’s in x, y, and z? // what should we look out for?! x = num1; y = num2; x = y; z = x + y; z = z + 1; return z; } alert( tryMe(3, 4) ); ]]> ]]> ]]> ]]> ]]> ]]>