Assessment and help wanted for Silly story generator

I feel like I have a good grip on the material taught in the module JS First Steps. I’m stuck however, and I need help. I’m stuck at Completing the result() function: in the MDN instructions. A link to the actual task or assessment page, so you can find the question I want help with is below.
https://developer.mozilla.org/en-US/docs/Learn/JavaScript/First_steps/Silly_story_generator

Here’s the link to my project on codepen https://codepen.io/creativecodepenuser/project/editor/XxPwRW

Thanks!

Hello @problemSolver

in your result function

story.textContent = ;

you need to set the story.textContent to the text to be displayed

hope that help and have a nice day

I coded story.textContent = storyText; but the project is still incomplete.

Hello @problemSolver

you also need to

  1. replace :insertx: and :inserty: and :insertz: with the right random string

also notice that there 2 :insertx: in the story text

  1. the replace the temperature and weight to the correct one based on user selection uk or us

  2. replace the name Bob to the name value if it not empty

all that should be happen in the result function

hope that help and have a nice day :slight_smile:

I did what you said but my code still doesn’t work.

change this line

story.textContent = storyText;

to

story.textContent = newStory;

cause in the first one you still use the old/default value of the story without the replacement

hope that help and have a nice day :slight_smile:

Thanks! It works fine now.

you welcome :slight_smile: