Build a Sentence Maker - Build a Sentence Maker

Tell us what’s happening:

There is a serious concern in Build a Sentence Maker: I am making proper declarations, but it still shows an error. Once it shows the correct format… major time-consuming rather than time wasted to do it again and again just because this console itself has some issues

Your code so far

let adjective = "huge";
let noun = "Elephent";
let verb = "jump";
let place = "jungle";
let adjective2 = "run";
let noun2 = "disco";


let 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);

let adjective = adjective;
let noun = noun;
let verb = verb;
let place = place;
let adjective2 = adjective2;
let noun2 = noun2;

let 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/153.0.0.0 Safari/537.36

Challenge Information:

Build a Sentence Maker - Build a Sentence Maker

GitHub Link: freeCodeCamp/curriculum/challenges/english/blocks/lab-sentence-maker/66c057041df6394ca796bf33.md at main · freeCodeCamp/freeCodeCamp · GitHub

Welcome to the forum @Tejaswinad,

I’m seeng this syntax error in the console:

SyntaxError: unknown: Identifier 'adjective' has already been declared. (13:4)

  11 | console.log("First story:"+ firstStory);
  12 |
> 13 | let adjective = adjective;
     |     ^
  14 | let noun = noun;
  15 | let verb = verb;
  16 | let place = place;

Can you declare a variable more than once?

Happy coding

you can’t declare the same variable twice, here you are declaring all of them a second time
also, why are you assigning the variable to itself?

code removed by moderator

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.

got my mistake. will resolve now

I went ahead and combined your posts for you. In the future, just reply to the original thread to add further updates.