Basic JavaScript - Declare a Read-Only Variable with the const Keyword

Tell us what’s happening:
Reading and reading and reading but I’m oblivious to whats needed here.

Describe your issue in detail here.

Your code so far

const fCC = "freeCodeCamp"; // Change this line
let 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 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36

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

Link to the challenge:

  • List item

You should change fCC to all uppercase.

const fCC = "freeCodeCamp";

“fCC” is not all uppercase, which is the convention for constant names.

I’ve now done:

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

Failed:var should not exist in your code.
Failed:You should change fCC to all uppercase.
Failed:FCC should be a constant variable declared with const.
Failed:The string assigned to FCC should not be changed.
Failed:fact should be declared with let.
Failed:console.log should be changed to print the FCC and fact variables.

However tests still won’t run and i don’t know what I’m doing wrong

Reset the code and perform it again because, you have made some unnecessary changes.

1 Like