dhamsmo
1
Just finished the project. Probably not the most elegant solution, but it runs so thats nice lol.
i like the strong mace joke, haha
i think potentially you could use your intros as the keys for your joke middles and ends, i.e.:
let jokeMiddles = {
'Knock, knock!': ['Orange', 'Leon', 'Quiche' ],
...
}
so that when you’re building the joke you can just assign:
const buildJoke = (beginning) => {
middle = jokeMiddles[beginning][getRandom()];
end = jokeEnds[beginning][getRandom()];
}
but it seems efficient already so idk
i changed my mind, this is my favorite joke:
A horse walks into a bar. He orders a drink and puts a can of pepper
spray on top the bar. The horse says, “You read my mind, buddy.”
Glad you liked the jokes lol.
Thanks for your feedback on a potential way of making the code more efficient!