Review wanted for "Silly story generator" task

Hi guys, recently found the MDN learning materials and it’s really helped me progress my javascript knowledge.

I’ve just completed the Silly Story Generator and would like some feedback on my code. Silly Story Generator and here’s a link to my code pen Silly Story Codepen

Excited for feedback plus any other ways to go about completing the task.

Hi @michaellawson and welcome to the community :wave:

Nice work on this exercise!

If you move everything between randomize.addEventListener('click', result); and function result() { into the result() function, this would make sure that you can click the button multiple times and it gets randomized every time.
Everything else seems correct. :+1:

Have a nice day,
Michael

PS: Your email address is visible in your post. It ended up in the optional “name” field of your profile. I recommend removing it.

Hi Michael, thank you for the welcome. Happy to be here.

Thank you for the advice. It all works great now. And thanks for noticing the email :man_facepalming:

1 Like

Glad to hear that.

Now your code is perfect.