Explorar el Código

Add push wrapper function to stack

ApisNecros hace 2 años
padre
commit
169994b98d
Se han modificado 1 ficheros con 5 adiciones y 1 borrados
  1. 5 1
      starfish.js

+ 5 - 1
starfish.js

@@ -218,6 +218,10 @@ class Stack {
         this.register = null;
     }
 
+    Push(newValue) {
+        this.stack.push(newValue);
+    }
+
     /**
      * Implement }
      * 
@@ -242,7 +246,7 @@ class Stack {
      * Swaps the top two values of the stack
      */
     SwapTwo() {
-        
+        // TODO
     }
 
     /**