Let/const Guide Articles Update

“declare a read-only variable with the const keyword”

this step of the course is bugged, it doesn’t work even with the correct code

well, maybe my code is wrong so I went to get a hint and the hint for this exercise is wrong, it refers to a different exercise which is not at all the one that’s there.

Please include the link to the challenge. Thanks.

The challenge does not have a bug - it works with correct code. But I think that the solution in the guide probably does need to be updated.

HI @vinni.vcr !

The hint page has been updated with the correct hints and correct answer.

There is an open issue concerning the comment tags here.

// Only change code below this line
var fCC = "freeCodeCamp";
var fact = "is cool!";
// Only change code above this line

It is possible that you only wrote your code inside those comment tags and didn’t change the console.log right below it.

console.log(fCC, fact);

If you are still having issues with the challenge, then please post your code and we can help you.

1 Like

Hi, thank you for the response. I did change the console.log

Here is my code:

// Only change code below this line
const FCC = "FreeCodeCamp";
let fact = "is Cool!";
// Only change code above this line

fact = "is awesome!";
console.log(FCC, fact); 

Here is the error message: "FCC should be a constant variable declared with const."

You changed the strings values

1 Like

As @ilenia has mentioned it looks like you changed code you were not supposed to.

Here is what I wrote

and here is what you wrote.

Hi, I didn’t write just “Cool”, it was “is Cool”, but anyway, I changed to “is cool” and it still doesn’t work:

// Only change code below this line
const FCC = "FreeCodeCamp";
let fact = "is cool!";
// Only change code above this line

fact = "is awesome!";
console.log(FCC, fact);

and the same error message: "FCC should be a constant variable declared with const."

It would be easier for you to reset the lesson instead of asking us to play wack-a-mole with your typos.

You have changed the capitalization on freeCodeCamp like you did with cool. That’s why it was quoted and compared to the original input above.

I’ve edited your post for readability. When you enter a code block into a forum post, please precede it with a separate line of three backticks and follow it with a separate line of three backticks to make it easier to read.

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

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

Yep I got that part :grinning:
But I was trying to highlight the fact that you capitalized the word cool when you weren’t supposed to.

But you also forget this part.

You still wrote this

The core issue is that you are changing the strings when you are not supposed to touch them at all.

I agree with @JeremyLT that it is probably easier to just reset the lesson and only change the const variable name.

Hope that is clearer now

1 Like