瀏覽代碼

Add push wrapper function to stack

ApisNecros 2 年之前
父節點
當前提交
169994b98d
共有 1 個文件被更改,包括 5 次插入1 次删除
  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
     }
 
     /**