Build a Logic Checker App - Step 3

Tell us what’s happening:

i’m really stuck here, how to reassign the value of a “const variable” all I have read says this can’t be done

Your code so far


// User Editable Region

const truthyOrFalsy = true;

console.log(Boolean(truthyOrFalsy));
truthyOrFalsy = freeCodeCamp;

// User Editable Region

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/143.0.0.0 Safari/537.36

Challenge Information:

Build a Logic Checker App - Step 3

Hi @grahamjohnson75

Change the assignment of truthyOrFalsy by setting its value to "freeCodeCamp".

One line 1 change the Boolean value to the new value.

Happy coding

1 Like

Thank’s :grin: I need to do more reading still don’t understand how that can be done if you can’t reassign a const variable

Here, you are not reassigning the value.

You are changing the initial value.

If you tried to use the assignment operator to change the value, then that would raise an error.