Build a String Formatter - Step 13

Tell us what’s happening:

I have read codes from other posts and tried, but still can’t pass it, could you help? Thanks.

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

const lowercaseWord = "camelcase";

const camelCasedVersion;

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

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/142.0.0.0 Safari/537.36 Edg/142.0.0.0

Challenge Information:

Build a String Formatter - Step 13

If you take a look at the console on page, there’s error:

SyntaxError: unknown: Missing initializer in const declaration. (27:23)

  25 | const lowercaseWord = "camelcase";
  26 |
> 27 | const camelCasedVersion;
     |                        ^
  28 |
  29 | console.log("Camel cased version:");
  30 |

It means that variable declared with const is missing initial value. What was supposed to be the value of camelCasedVersion?

I also tried like this but still not working

const lowercaseWord = “camelcase”;

const camelCasedVersion = “”;

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

console.log(camelCasedVersion);

the first instruction is

Start by creating a variable called lowercaseWord and assign it the string "camelcase" .

You did that
then it says

Below that lowercaseWord variable, create another variable called camelCasedVersion and assign it an empty string for now.

which you did

then it says

Below that camelCasedVersion variable, add a console.log() with the string "Camel cased version:" followed by another console.log() for the camelCasedVersion variable.

and it looks you did

so please reset the step and try again