Build a String Formatter - Step 15

Tell us what’s happening:

const camelCasedVersion = lowercaseWord.slice(0, 5);
console.log(lowercaseWord.slice(0, 5) + lowercaseWord[5].toUpperCase());

I appraoched the workshop on JS step 15 like this but when checking the answer it is not passing, why

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

const lowercaseWord = "camelcase";

// User Editable Region

const camelCasedVersion = lowercaseWord.slice(0, 5);
console.log(lowercaseWord.slice(0, 5) + lowercaseWord[5].toUpperCase());

// User Editable Region

console.log("Camel cased version:");
console.log(camelCasedVersion);

Your browser information:

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

Challenge Information:

Build a String Formatter - Step 15

you need to keep building this value here

I have followed the responses shared from all those facing similar issues with the code even after following the instructions keenly but I’m stuck since yesterday on this step and it is becoming really boring.

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

const lowercaseWord = “camelcase”;

const camelCasedVersion = lowercaseWord.slice(0, 5)

console.log(“Camel cased version:”);

console.log(camelCasedVersion);

// Here is the code below, please tell me what is wrong or its a systematic issue from your end

console.log(camelCasedVersion + lowercaseWord[5].toUpperCase());

Please create your own topic using the Help button, so all of your code and a link to the challenge will automatically be included. This helps us help you!

Thank you.

Lo que debes de hacer es usar la variable ya declarada usando let porque esta permite redeclarar la variable: let camelCasedVersion que ahora tiene la cadena camel y unirla con la variable
code removed by moderator

hi @lopezruanojonathan

It is great that you solved the challenge, but instead of posting your full working solution, it is best to stay focused on answering the original poster’s question(s) and help guide them with hints and suggestions to solve their own issues with the challenge. How to Help Someone with Their Code Using the Socratic Method

We are trying to cut back on the number of spoiler solutions found on the forum and instead focus on helping other campers with their questions and definitely not posting full working solutions.