Please I am having problem with this topic. Declare a read only variable with the const keyword

Tell us what’s happening:
Describe your issue in detail here.

Your code so far


var fCC = "freeCodeCamp"; // Change this line
var fact = "is cool!"; // Change this line
fact = "is awesome!";
console.log(fCC, fact); // Change this line

Your browser information:

User Agent is: Mozilla/5.0 (Linux; Android 8.1.0; Infinix X624B) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.92 Mobile Safari/537.36

Challenge: Declare a Read-Only Variable with the const Keyword

Link to the challenge:

What problem are you having? What code have you tried?

Read the exercise carefully, learn the difference between const and let, and pay attention to the note especially! var is the old way to declare variables.

1 Like

I have tried using the below code:

Const FCC = " FREECODECAMP";
let fact = "it's cool !";
fact = " it's awesome!";
console.log ( FCC, fact);

const is lower cased, and changing the message"freeCodeCamp" all upper case doesnt change passing the test.

It keeps telling me FCC should be declared with const which I think I have done already

you did, but you capitalized the c.

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 (’).

In addition to the capital C in const, you added a space in that string, you’ve capitalized the string (you were only supposed to change variable name, not the contents of the string) and you changed the two other strings - you were not supposed to touch those.

I’ve gotten it done sir .
Thanks!!