Assessment and help needed: Silly story generator

Hi there,

I’d like to ask if someone could have a look over my code please.

Link to my codepen:

Link to assessment:

I checked my code to make sure that were no typos since I couldn’t figure out why when the story is generated, it keeps showing :insertx: rather than the name and I’m not sure why it’s happening. Any advice would be appreciated. Thank you!

Hello @Kebin

you doing great well done

it cause the text has 2 :insertx: so you can solve it by 3 ways

  1. call replace(":insertx:", xItem); twice
  2. use replaceAll
  1. or use regular expression

hope that help and have a nice day :slight_smile:

2 Likes

Hi @justsomeone,

Thanks so much for the help! It was such a tiny mistake that I missed haha

Appreciate the help!

1 Like

@Kebin you very welcome and sure it does

keep the good work :slight_smile:

1 Like