The problem is that now each character is printed on a separate line.
We can fix this by replacing console.log
with process.stdout.write
.
As we still want the output to end with a newline character, print \n
once you’re done with the main string
And, yeah. Let’s rename our function once again.
writeLog
sounds like decent name to me.
This task is part of the Full-Stack JavaScript Course.
If you have any issues with it, you can ask for community help below the post.
Feel free to help others if you’ve already solved the task.