A project suggested from Codecademy Full-Stack Engineer course! Generate and display a random message created in Javascript. My version of the project creates a fantasy RPG style madlib kind of message and logs it to the console.
Holds several arrays of message contents. Includes three sets of functions that create unique variations of "madlibs". Randomly picks which elements to add to the variations. Randomly chooses which of the three styles to use and logs it to the console. Also includes a variation of the functions to return the message rather than just print it. The print function actually uses that to log it to the console.
The goal of this project was not exactly to make it as small as possible but to do a bunch of coding practice in various ways. I made the project and refactored it a few times to make it streamlined by having functions be as simple as possible and only do one thing. I also purposely made a bunch of functions to do these sorts of practice items in this small project. It also has a variation in style of tools used in the code for practice. Example: One function uses a switch statement while another uses an if else tree.
- Javscript
- Node.js
- Codecademy
- Markdown
- Github
The script can be run in a node.js environment.
- Create three variations of "madlibs" in a fantasy rpg style.
- Put random elements from several arrays into the message.
- Log a random message to the console.
Project status is complete.