Need Assessment wanted for Silly story generator

Assessment wanted for Silly story generator

Hello, it would be very helpful if someone could check my code, because when I try to execute it, nothing happens when I press the button.
Thank you!

This is my CodePen

Hi @Pepinovsky11 and welcome to the community :wave:

If you open the Firefox DevTools and click on the button you see:

Uncaught TypeError: newStory.replace is not a function

The reason for this is that you are doing let newStory = story; but story is the HTML element from line 4. You need to do let newStory = storyText; since storyText is the variable where the story string is stored.

Hope that help!

Happy Coding!
Michael

thank you very much

1 Like