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

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

#1

In this challenge, the last test is not passing. It is showing ( unexpected token ? ). i am totally stuck here. I heard that it’s a bug and someone already reported it couple of weeks ago. Then why isn’t it fixed yet ? What should i do ? someone please help to get through it.


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

Your browser information:

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

Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/es6/declare-a-read-only-variable-with-the-const-keyword


#2

yes it is a bug. If you search you will find others have reported it.


#3

Yeah i know it’s a bug. But its not fixed yet and the first report was couple of weeks ago. So i made this post. Thanks


#4

skip the challenge for now. Last time I saw it, it was fixed in github but I’m not sure how often the fixes make it back to the production environment.