Khan.randRange(6, 8) Khan.randRange(0, max_size - 2) Khan.randRange(0, 999) astackPushPRO.initJSAV(max_size, arr_size, insert_value)

Your task in this exercise is to show the behavior for the array-based stack's push operation. In the array displayed below, the "top" position is arr_size.

Push insert_value onto the stack.

Click on a value of the stack to highlight it, then click on the "Insert" button to insert insert_value to the highlighted position.

To change the value of "top", click on a cell in the array to highlight it, then click "Set Top".

[astackPushPRO.userInput]
if (!astackPushPRO.checkAnswer(max_size, arr_size) && !guess[0]) { return ""; // User did not click, and correct answer is not // initial array state } else { return astackPushPRO.checkAnswer(max_size, arr_size); }

If the index of "top" is greater than or equal to array size, then the stack is full and nothing can be added. In this case, just click "check answer".

Otherwise, the first step would be to insert a value into the "top" position of the stack.

Finally, increase the "top" index by 1.