blob: 2532bc706da22e0ce28de643ae522d9d759f5ade (
plain) (
tree)
|
|
fs = require 'fs'
sleep = (ms) -> new Promise (resolve) -> setTimeout resolve, ms
fs.readFile '2222.txt', 'utf8', (err, data) ->
throw err if err
words = data.split '\n'
displayWords words
displayWords = async (words) ->
for word in words
if word.trim()
process.stdout.write "\x1Bc" # Clear the screen
console.log word
await sleep 603.9604
|