--- id: 587d7b87367417b2b2512b41 title: Declare a Read-Only Variable with the const Keyword challengeType: 1 videoUrl: '' localeTitle: '' --- ## Description undefined ## Instructions undefined ## Tests
```yml tests: - text: '' testString: 'getUserInput => assert(!getUserInput("index").match(/var/g),"var does not exist in your code.");' - text: '' testString: 'getUserInput => assert(getUserInput("index").match(/(const SENTENCE)/g), "SENTENCE should be a constant variable declared with const.");' - text: '' testString: 'getUserInput => assert(getUserInput("index").match(/(let i)/g), "i should be declared with let.");' - text: '' testString: 'getUserInput => assert(getUserInput("index").match(/console\.log\(\s*SENTENCE\s*\)\s*;?/g), "console.log should be adjusted to print the variable SENTENCE.");' ```
## Challenge Seed
```js function printManyTimes(str) { "use strict"; // change code below this line var sentence = str + " is cool!"; for(var i = 0; i < str.length; i+=2) { console.log(sentence); } // change code above this line } printManyTimes("freeCodeCamp"); ```
## Solution
```js // solution required ```