Build a Sentence Maker - Build a Sentence Maker

Tell us what’s happening:

Build a Sentence Maker – tests fail even though output looks correct
Hi everyone :waving_hand:
I’m working on the Build a Sentence Maker challenge in Basic JavaScript.

My console output looks correct, but the tests keep failing with messages about using the correct story format and variable order.

Your code so far

var adjective = "brave";
var noun = "dragon";
var noun2 = "marshmallows";
var place = "mountain";
var adjective2 = "fiery";
var verb = "angry";

var firstStory =
  "Once upon a time, there was a(n) " + adjective + " " + noun +
  " who loved to eat " + noun2 +
  ". The " + noun +
  " lived in a " + place +
  " and had " + adjective2 +
  " nostrils that blew fire when it was " + verb + ".";

console.log("First story: " + firstStory);

adjective = "sneaky";
noun = "cat";
noun2 = "cupcakes";
place = "library";
adjective2 = "tiny";
verb = "excited";

var secondStory =
  "Once upon a time, there was a(n) " + adjective + " " + noun +
  " who loved to eat " + noun2 +
  ". The " + noun +
  " lived in a " + place +
  " and had " + adjective2 +
  " nostrils that blew fire when it was " + verb + ".";

console.log("Second story: " + secondStory);

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/144.0.0.0 Safari/537.36

Challenge Information:

Build a Sentence Maker - Build a Sentence Maker

Please assemble your story strings so they are on one line.

Also, I suggest a review of this theory lecture, particularly the very last paragraph before the quiz questions:

Introduction to JavaScript - How Do let and const Work Differently When It Comes to Variable Declaration, Assignment, and Reassignment? | Learn | freeCodeCamp.org

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.