This code currently works. If the first line of this code were changed to 406 (as shown) what would happen?
It would add one to x (making if 407), then enter the "if" statement where x would be set to zero. The program would then loop normally.
It would stop when it got to the if statement.
It would keep x = 406 the whole time.
Nobody knows. This is one of the "fundamental mysteries of computer science"
Notice where gooseHeight is declared in the code below.
Would the background(gooseHeight) function work or would it cause an error?
It would not cause an error.
It would cause an error because the background can't be the same color as the height of a moose.
It would cause an error because gooseHeight is declared locally.
In this example, is mooseHeight defined globally or locally?
Globally
Locally
Globally and Locally
Neither
In this example, would the background statement be able to use mooseHeight as the color (instead of 220)?
Yes because mooseHeight is declared globally.
Yes because mooseHeight is declared locally.
No, because mooseHeight is declared locally.
No, because mooseHeight is declared globally.
In JavaScript all variable are of the same type.