Sequential Queue | JavaScript

ThiccDaddyLOAF

February 5th, 2021 03:17:08 PM

					
class SequentialQueue{ //if you want it to go backwards, too bad next(){ return this.i++; } constructor(start = 0){ this.i = start; } } const que = new SequentialQueue(0); for(let i = 0; i < 10; i++){ console.log(que.next()); }

Featured Posts