This commit is contained in:
xiaoyu
2023-05-22 14:05:15 +08:00
parent 168dadfdea
commit 438b274f2b
1397 changed files with 141880 additions and 0 deletions
+18
View File
@@ -0,0 +1,18 @@
var Stack=require('../stack');
//create a new Stack instance
var stack=new Stack;
stack.autoRun=false;
for(var i=0; i<50; i++){
//add a bunch of stuff to the stack
stack.add(makeRequest.bind(stack,i));
}
stack.next();
function makeRequest(index){
//do stuff
console.log(`making LIFO request ${index}`);
this.next();
}