Merge pull request #14164 from Manish-Giri/fix/fix-instructions-learn-how-stack-works

Change stack top element in instructions
pull/14442/head
Dylan 2017-04-16 12:04:58 -05:00 committed by GitHub
commit 6b5fd55a34
1 changed files with 1 additions and 1 deletions

View File

@ -53,7 +53,7 @@
"This data storage scheme is called a <dfn>Stack</dfn>. In particular, we would have to implement the <code>push()</code> method that pushes JavaScript objects at the top of the stack; and <code>pop()</code> method, that removes the JavaScript object that's at the top of the stack at the current moment.",
"<hr>",
"Here we have a stack of homework assignments represented as an array: <code>\"BIO12\"</code> is at the base, and <code>\"PSY44\"</code> is at the top of the stack.",
"Modify the given array and treat it like a <code>stack</code> using the JavaScript methods mentioned above. Remove the top element <code>\"BIO12\"</code> from the stack. Then add <code>\"CS50\"</code> to be the new top element of the stack."
"Modify the given array and treat it like a <code>stack</code> using the JavaScript methods mentioned above. Remove the top element <code>\"PSY44\"</code> from the stack. Then add <code>\"CS50\"</code> to be the new top element of the stack."
],
"challengeSeed": [
"var homeworkStack = [\"BIO12\",\"HIS80\",\"MAT122\",\"PSY44\"];",