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

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

#1

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");



#2

#4

I also stack here … help help !!


#5

Same code, same issue

Unexpected token ‘?’


#6

@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.


#7

It happens the same thing to me…


#8

This is annoying :confused:


#9

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.