Build a String Inspector - Step 4

Tell us what’s happening:

Stupid string inspector doesn’t even tell me what the problem is

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(hasFreecodeCamp);


// User Editable Region

let message = `${hasFreeCodeCamp}` "returns true because the word "freeCodeCamp" is in the sentence.";
console.log(message);


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3.1 Safari/605.1.15

Challenge Information:

Build a String Inspector - Step 4

Tell us what’s happening:

I keep being told what message I should log rather than being told what the problem is, even after logging in the new code and revising it over and over again

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


// User Editable Region

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


// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/26.3.1 Safari/605.1.15

Challenge Information:

Build a String Inspector - Step 4

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

It looks like you may have written this outside of the fCC editor since you are using curly quotes rather than straight quotes.

Oh, is that how you do it? Okay, thank you

Wait, so how do I change them to straight quotes? Should I just copy from the editor? And what’s weird is that I read someone else who had that same problem, and they had curly quotes, so I looked at mine but mine seemed straight in the editor…

You have curly quotes around the “freeCodeCamp” strings. Just remove them and replace with a straight quote in the fCC editor.

Thank you so much!!! It worked!!

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