|
@@ -733,7 +733,12 @@ class Stack {
|
|
* @param {*} newValue
|
|
* @param {*} newValue
|
|
*/
|
|
*/
|
|
Push(newValue) {
|
|
Push(newValue) {
|
|
- this.stack.push(newValue);
|
|
|
|
|
|
+ if(Array.isArray(newValue)) {
|
|
|
|
+ this.stack.push(...newValue);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ this.stack.push(newValue);
|
|
|
|
+ }
|
|
}
|
|
}
|
|
/**
|
|
/**
|
|
* Wrapper function for Array.prototype.pop
|
|
* Wrapper function for Array.prototype.pop
|