This is my first attempt at a Javascript project off-site and i would love to hear any feedback on it. I didn’t feel that it was too hard but maybe it’s because my code is sloppy Thanks in advance!
I’ve been Coding for seven years and this is tight and clean. It’s very simple, but still very well done.
If you want to bring this program to the next level, and you don’t mind unsolicited advice, I have a couple of ideas that would give you an opportunity to broaden you skills, and would allow you to easily inject this code into future projects.
First, I would consider treating the joke like an object with the attributes: things, emotions, actions, and reason. Making it an object will allow you to plug it into any future projects you might have.
Second, as opposed to having an imbedded array of strings, I would start looking into building in functionality to scoop data from a txt file. This would allow you to continue to add more items to each list in the future without having an array that is thousands of characters long. It will also have the added benefits of saving system memory. Just make sure you have a consistent formatting, and are careful about your delimitator.