Build a String Inspector - Step 8

Tell us what’s happening:

I’m stuck on step #8. It’s telling me I should declare a variable named platform. I did, but it doesn’t seem to be working. Am I missing something? Also, this is my first time posting to the forum.

Your code so far

const fccSentence = “freeCodeCamp is a great place to learn web development.”;

console.log(“Here are some examples of the includes() method:”);

const hasFreeCodeCamp = fccSentence.includes(“freeCodeCamp”);

console.log(`fccSentence.includes(“freeCodeCamp”) returns ${hasFreeCodeCamp} because the word “freeCodeCamp” is in the sentence.`);

const hasJavaScript = fccSentence.includes(“JavaScript”);

console.log(`fccSentence.includes(“JavaScript”) returns ${hasJavaScript} because the word “JavaScript” is not in the sentence.`);

const hasLowercaseFCC = fccSentence.includes(“freecodecamp”);

console.log(`fccSentence.includes(“freecodecamp”) returns ${hasLowercaseFCC} because includes is case-sensitive.`);

const message = “Welcome to freeCodeCamp!”;

console.log(“Here are some examples of the slice() method:”);

const message = “Welcome to freeCodeCamp”;

const platform = message.slice(11, 23);

const fccSentence = "freeCodeCamp is a great place to learn web development.";

console.log("Here are some examples of the includes() method:");

const hasFreeCodeCamp = fccSentence.includes("freeCodeCamp");
console.log(`fccSentence.includes("freeCodeCamp") returns ${hasFreeCodeCamp} because the word "freeCodeCamp" is in the sentence.`);

const hasJavaScript = fccSentence.includes("JavaScript");
console.log(`fccSentence.includes("JavaScript") returns ${hasJavaScript} because the word "JavaScript" is not in the sentence.`);

const hasLowercaseFCC = fccSentence.includes("freecodecamp");
console.log(`fccSentence.includes("freecodecamp") returns ${hasLowercaseFCC} because includes is case-sensitive.`);

const message = "Welcome to freeCodeCamp!";

console.log("Here are some examples of the slice() method:");


// User Editable Region

const message = "Welcome to freeCodeCamp";
const platform = message.slice(11, 23);

// User Editable Region

Your browser information:

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

Challenge Information:

Build a String Inspector - Step 8

Welcome to the forum @KGKhxh72

Did you notice the message in the console?

Happy coding

I did after posting it. It’s my first time posting to this forum.

1 Like

welcome to the forum!

after seeing the error message do you need more help?

Yes please. I’m still unable to figure out what I’m doing wrong or missing. Thanks.

the error says Identifier 'message' has already been declared, right?

and you have message declared twice, do you see the issue?

Ah yes, thanks. It’s fixed now. Thank you for your help.

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