Following the directions for the Mixed Messages project, I wanted to share what I came up with per the directions. Open to any and all feedback!
Here’s my code repository.
I felt the project was fairly straightforward. It probably took me between 1 and 2 hours, though it would have been much quicker if I had just followed the bare minimum requirements. I had a chance to practice/learn some new things:
- Had to refresh my memory of asynch/await as I wanted a countdown timer (with each second updating the screen)
- I learned how to use process.stdout.write to write to the console without a newline character being added (and even learned of the \r flag to overwrite what was already there).
- I used destructuring to import two items from another file.
- It took me a moment to figure out how to approach the data. I ended up going with an array of objects. Maybe it would be more efficient to declare a Trivia object and have an object factory function to produce the objects and push them onto an array? Open to other thoughts. Clearly, a robust/large solution would use a database but wanted to keep this fairly simple.
Thank you!