В чому помилка ?
підкажіть будь ласка
functions.js
import { sleep } from "./helper.js";
export const writeLog = async(s, delay) => {
for (let i = 0; i <= s.length; i++) {
process.stdout.write(s.charAt(i));
await sleep(delay);
}
process.stdout.write('\n');
}
helper.js
export const sleep = (ms) => {
return new Promise(resolve => setTimeout(resolve, ms));
}
solution.js
import { writeLog } from './functions.js';
const message = `
Hello, world 👋!
Let's make our Console Output Fun and Interactive in JavaScript and Node.js 🚀
`;
const delay = 15;
writeLog(message, delay);