Build a String Formatter - Step 15

Tell us what’s happening:

En el paso 15 para construir un formateador de cadenas me aparece este error aun cuando ya concatene las cadenas, alguien puede ayudarme

Debes concatenar lowercaseWord.slice(0, 5)con lowercaseWord[5].toUpperCase().

Your code so far

const userInput = "   Hello World!   ";
console.log("Original input:");
console.log(userInput);

const cleanedInput = userInput.trim();
console.log("Result of trimming whitespace from both ends:");
console.log(cleanedInput);

const trimmedStart = userInput.trimStart();
console.log("After using the trimStart() method, leading spaces removed:");
console.log(trimmedStart);

const trimmedEnd = userInput.trimEnd();
console.log("After using the trimEnd() method, trailing spaces removed:");
console.log(trimmedEnd);

const upperCaseInput = cleanedInput.toUpperCase();
console.log("Result of using the toUpperCase() method:");
console.log(upperCaseInput);

const lowerCaseInput = cleanedInput.toLowerCase();
console.log("Result of using the toLowerCase() method:");
console.log(lowerCaseInput);


// User Editable Region


camelCasedVersion = `lowercaseWord.slice(0, 5)`+ `lowercaseWord[5].toUpperCase()` + `lowercaseWord.slice(6)`;

console.log(camelCasedVersion);


// 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 Formatter - Step 15

You don´t need to use `` backsticks, when you doesn´t write a string directly.
Why did you added lowercaseWord.slice(6) ?

How can you solve this error below?

ReferenceError: camelCasedVersion is not defined

const camelCasedVersion = lowercaseWord.slice(0, 5)

It looks like you may have changed the starting code in areas you were not asked to change, which will cause the tests to fail. Please click the reset button to restore the original code and try again.

image

Then only do what is asked in the instructions - nothing more.

Use the + operator to concatenate lowercaseWord.slice(0, 5) with the result of using the correct method for converting strings to uppercase on lowercaseWord[5].

Now you should see camelC in the console.