Build a String Inspector - Step 4

Tell us what’s happening:

Utilisez maintenant une chaîne littérale ou une concaténation de chaînes pour consigner le message fccSentence.includes(“freeCodeCamp”) returns because the word “freeCodeCamp” is in the sentence.dans la console. Remplacez <valeur> par la valeur réelle de la var

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) returns"  + fccSentence + '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/144.0.0.0 Safari/537.36

Challenge Information:

Build a String Inspector - Step 4

What is in the console:

fccSentence.includes('freeCodeCamp'returns) returnsfreeCodeCamp is a great place to learn web development.because the word "freeCodeCamp" is in the sentence

what should be returned:

fccSentence.includes("freeCodeCamp") returns <hasFreeCodeCamp> because the word "freeCodeCamp" is in the sentence.

let me put there like this:

actual   fccSentence.includes('freeCodeCamp'returns) returnsfreeCodeCamp is a great place to learn web development.because the word "freeCodeCamp" is in the sentence
expected fccSentence.includes("freeCodeCamp") returns <hasFreeCodeCamp> because the word "freeCodeCamp" is in the sentence.

do you see the differences?

1 Like

on dire que j’ai pas bien comprie , voile le sujet de l’exercice , cet exercice ma coincés j’arrive avancer : Utilisez maintenant une chaîne littérale ou une concaténation de chaînes pour consigner le message fccSentence.includes("freeCodeCamp") returns <hasFreeCodeCamp> because the word "freeCodeCamp" is in the sentence.dans la console. Remplacez `` <hasFreeCodeCamp>par la valeur réelle de la variable.

if you have made changes to the code, please post your new code

1 Like

merci je trouve la reponse : removed grâce a toi

Please post again your code following this guide to improve the readability of the code. When you enter a code block into a forum post, please precede it with three backticks to make it easier to read.

You can also use the “preformatted text” tool in the editor (</>) to add the backticks.

See this post to find the backtick on your keyboard.
Note: Backticks (`) are not single quotes (').

/*Le prochain message du bot concernera sa localisation.

Créez une variable appelée botLocationSentence.

Utilisez ensuite la concaténation de chaînes avec l' +opérateur pour joindre la chaîne "I live in "à la botLocation variable suivie d'un point ( .).

Attribuez cette valeur à la botLocationSentence variable.

Ensuite, consignez la valeur botLocationSentence */


const botLocation = "the universe";

const botLocationSentence = "I live in " + botLocation + ".";

console.log(botLocationSentence);

//Vous devriez avoir une console instruction dans votre code. ce la reponce qu'il me donne, ce qui veux dire l'exercice et fausse , je besoin votre aide , merci par d'avance .


Please don’t share solution code on the forum
Veuillez ne pas partager le code de la solution sur le forum.

This is a different exercise, correct? Please open a new thread for that.

Il s’agit d’un exercice différent, n’est-ce pas ? Veuillez ouvrir une nouvelle discussion à ce sujet.

d’accord j’ai compris

1 Like