Declare a Read-Only Variable with the const Keyword

Change the code so that all variables are declared using let or const. Use let when you want the variable to change, and const when you want the variable to remain constant. Also, rename variables declared with const to conform to common practices, meaning constants should be in all caps.

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

Leave a Comment

Your email address will not be published.

error:
Scroll to Top