Exercise Declare a Read-Only Variable with the const Keyword Not working

I am having trouble with the following code:

function printManyTimes(str) {

    // Only change code below this line

    const sentence = str + " is cool!";
    for (let i = 0; i < str.length; i+=2) {
        console.log(sentence);
    }

    // Only change code above this line

}
printManyTimes("freeCodeCamp");

When I run it in WebStorm I get the correct result but I am receiving the following error.
How can I make it work?

You must match the required case for the variable

SENTENCE should be a constant variable declared with const .

Your variable is not in ALL CAPS.


Side note: including the link to the challenge you are working on is really helpful!

Good to know. I will make the change.

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.