Answer:

You’ll get a “ Variable undefined ” error.

Although it may seem that the variable should exist since it was declared before the Display function, it won’t because I made the mistake of scoping the variable to the class. Remember: variables are scoped to a function — properties are scoped to the object.

back to Dan Howard's article