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

**URL:** <https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-declare-a-read-only-variable-with-the-const-keyword/301201>\
**Category:** freeCodeCamp Contributors\
**Tags:** guide\
**Created:** [August 3, 2019, 5:49am UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-declare-a-read-only-variable-with-the-const-keyword/301201 "2019-08-03T05:49:15Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![camperbot](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/camperbot/32/18364_2.png) [@camperbot](https://forum.freecodecamp.org/u/camperbot)\
**Post date:** [August 3, 2019, 5:49am UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-declare-a-read-only-variable-with-the-const-keyword/301201/1 "2019-08-03T05:49:15Z")

</div>

# [Declare a Read-Only Variable with the const Keyword](https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/es6/declare-a-read-only-variable-with-the-const-keyword)

* * *

## Problem Explanation

Change the code so that all variables are declared using `let` or `const` .

* * *

## Hints

### Hint 1

- You should change `fCC` to all uppercase.

### Hint 2

- `FCC` should be a constant variable declared with `const` .

### Hint 3

- `fact` should be declared with `let` .

### Hint 4

- `console.log` should be changed to print the `FCC` and `fact` variables.

* * *

## Solutions

> **Solution (Click to Show/Hide)**
>
> ```javascript
> const FCC = "freeCodeCamp";
> let fact = "is cool!";
> 
> fact = "is awesome!";
> console.log(FCC, fact);
> 
> ```
> 
> #### Relevant Links
> 
> - [const](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/const)
> - [let](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Statements/let)

---

<div class="post-metadata">

**Author:** ![ILM](https://sea3.discourse-cdn.com/freecodecamp/user_avatar/forum.freecodecamp.org/ilm/32/363239_2.png) [@ILM](https://forum.freecodecamp.org/u/ILM)\
**Post date:** [January 8, 2025, 3:59pm UTC](https://forum.freecodecamp.org/t/freecodecamp-challenge-guide-declare-a-read-only-variable-with-the-const-keyword/301201/2 "2025-01-08T15:59:01Z")

</div>

Closed on January 8, 2025, 3:59pm UTC


