Silly story generator Assesment wanted

Assessment wanted for Silly story generator.

Hi, I just started going through the Learning web development series. I’d be happy if i could get an assessment on what i did on the Silly story generator at

Link to my solution is available for assessment and criticism (that helps me a lot) at



1 Like

Hi, Paul-Ben :wave:
Congratulations, you passed the test.

Okay Paul, this is from me: :smiley:

  1. you can use replaceAll() method for xItem, and you can place method directly after another method (it’s you prefer).
  newStory = newStory.replace(":insertx:", xItem);
  newStory = newStory.replace(":insertx:", xItem);
  newStory = newStory.replace(":inserty:", yItem);
  newStory = newStory.replace(":insertz:", zItem);

like this:

  newStory = newStory
    .replaceAll(':insertx:', xItem)
    .replace(':inserty:', yItem)
    .replace(':insertz:', zItem);
  1. Take advantage template literal
  if(document.getElementById("uk").checked) {
    const weight = Math.round(300);
    const temperature =  Math.round(94);
    const stoneWeight = Math.floor(Math.round(weight/14));
    const celciusTemp = Math.floor(Math.round((5/9)*(temperature-32)))
    newStory = newStory.replace('94', celciusTemp);
    newStory = newStory.replace('fahrenheit', 'centigrade');
    newStory = newStory.replace('300', stoneWeight);
    newStory = newStory.replace('pounds', 'stone');


 if (document.getElementById('uk').checked) {
    const weight = `${Math.round(300 / 14)} stone`;
    const temperature = `${Math.round(((94 - 32) * 5) / 9)} centigrade`;
    newStory = newStory
      .replace('94 fahrenheit', temperature)
      .replace('300 pounds', weight);


1 Like