MCPcopy Create free account
hub / github.com/asweigart/PythonStdioGames / slowPrint

Function slowPrint

javascript_games/ninetyninebottles2.js:20–26  ·  view source on GitHub ↗
(text, pauseAmount=0.1)

Source from the content-addressed store, hash-verified

18
19
20async function slowPrint(text, pauseAmount=0.1) {
21 for (let i = 0; i < text.length; i++) {
22 process.stdout.write(text[i]);
23 await sleep(pauseAmount) // Pause in between each character.
24 }
25 console.log() // Print a newline.
26}
27
28
29function replaceAt(str, index, replacement) {

Callers 1

mainFunction · 0.70

Calls 1

sleepFunction · 0.70

Tested by

no test coverage detected