MCPcopy Create free account
hub / github.com/appacademy/Module-1-Resources / delayedPrinter

Function delayedPrinter

w3/d4/lecture.js:173–181  ·  view source on GitHub ↗
(delaysArr)

Source from the content-addressed store, hash-verified

171// 701408733 -> bark -> bazaar -> food
172
173function delayedPrinter(delaysArr) {
174 if (!delaysArr.length) return;
175
176 const currentDelay = delaysArr.shift();
177 console.log(currentDelay);
178
179 // delayedPrinter(delaysArr);
180 setTimeout(delayedPrinter, currentDelay, delaysArr);
181}
182
183// const delaysArr = [1000, 900, 800, 700, 600, 500, 400, 300, 200, 100];
184// delayedPrinter(delaysArr)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected