Build a String Inspector - Step 4

Tell us what’s happening:

Repost -

Please, can someone help me here. I’ve been stuck on this step for days.

I’m so close to giving up at this point, frustrated to the absolute max. This is as close as I’ve gotten with it, what am I doing wrong.

Any help at all would be greatly appreciated.

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


// User Editable Region

const hasFreeCodeCamp = fccSentence.includes("freeCodeCamp");

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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/140.0.0.0 Safari/537.36 OPR/124.0.0.0 (Edition std-1)

Challenge Information:

Build a String Inspector - Step 4

1 Like

Your sentence has a line break. Remove the line break, keep it all on one line.

1 Like

You’re telling me I had this issue because the console being open forced a line break.

I don’t know how you people manage to do this.

Thank you.

No, it was because you pressed “enter” when you were typing the line.

You should just copy/paste given text like this to avoid typing errors.

You are “you people” now, welcome.

2 Likes

This comes with experience, because writing code means debugging your code.
The more you write, the more you become aware of possible problems