RP22part2.init() RP22part2.expression

Consider the following SLang 1 expression:

expression

What is the value of this expression when it is evaluated in a global environment in which x, y, and z are bound to the values 1, 2, and 3, respectively? To get credit for this problem, you must provide two answers: the denoted value output by the interpreter that was previously discussed (which uses static binding), and the denoted value that would be output if the interpreter were using dynamic binding. Each answer is either a denoted value or the word "error" if the evaluation of the expression throws an exception (because the expression is syntactically or semantically invalid). In the latter case, the one-word answer is in all lowercase letters and does NOT include the double quotes.

Value under STATIC binding:
Value under DYNAMIC binding:
$('#answerStatic').val() + "/////" + $('#answerDynamic').val()
return RP22part2.validateAnswer(guess);

Determine the scope of the binding occurrences in each function definition that this expression contains. If needed, build an AST for this expression.

Match parameters to arguments in function calls.

Remember that the overall expression is evaluated in a global environment that is not empty.

The SLang 1 interpreter uses eager evaluation. Therefore, in a function call, all arguments are evaluated before the body of the function.