figure stack frames the first column contains the set of names known outside the body of the function fi the variables and zand the function name the first assignment statement binds to the assignment statement (xfirst evaluates the expression (xby invoking the function with the value to which is bound when is entereda stack frame is createdas shown in column the names in the stack frame are (the formal parameternot the in the calling context) and the variables and are bound to objects of type function the properties of each of these functions are given by the function definitions within when is invoked from within fyet another stack frame is createdas shown in column this frame contains only the local variable why does it not also contain xa name is added to the scope associated with function only if that name is either formal parameter of the function or variable that is bound to an object within the body of the function in the body of hx occurs only on the right-hand side of an assignment statement the appearance of name ( in this casethat is not bound anywhere in the function body (the body of hcauses the interpreter to search the previous stack frame associated with the scope within which the function is defined (the stack frame associated with fif the name is found (which it is in this casethe value to which it is bound ( is used if it is not found therean error message is produced when returnsthe stack frame associated with the invocation of goes away ( it is popped off the top of the stack)as depicted in column note that we never remove frames from the middle of the stackbut only the most recently added frame it is because it has this "last in first outbehavior that we refer to it as stack (think of stack of trays waiting to be taken in cafeterianext is invokedand stack frame containing ' local variable is added (column when returnsthat frame is popped (column when returnsthe stack frame containing the names associated with is poppedgetting us back to the original stack frame (column notice that when returnseven though the variable no longer existsthe object of type function to which that name was once bound still exists this is