Declare a Read-Only Variable with the const Keyword- help

Tell us what’s happening:
I keep getting testing error that says " unexpected token ‘?’…" can’t figure out what I am doing wrong.

Your code so far


function printManyTimes(str) {
  "use strict";

  // change code below this line

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

  // change code above this line

}
printManyTimes("freeCodeCamp");


1 Like

I also stack here … help help !!

Same code, same issue

Unexpected token ‘?’

1 Like

@Nymur @fpstidston - if you bothered to read the threads that I linked above you would know that this is a bug. A fix has been designed and it’s waiting to be approved, tested, and put into production.

1 Like

It happens the same thing to me…

1 Like

This is annoying :confused:

1 Like

The directions state to use standard naming conventions for constants. All constant variables should be in caps. Once you change sentence to SENTENCE for both the delcaration statatement and the callback in the console.log statement the code will work.

1 Like