diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword.md index 6492cd0eea..a6ad0552e9 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/declare-a-read-only-variable-with-the-const-keyword.md @@ -32,16 +32,14 @@ Change the code so that all variables are declared using `let` or `const`. Use ` `var` should not exist in your code. ```js -(getUserInput) => assert(!getUserInput('index').match(/var/g)); +assert.notMatch(code, /var/g); ``` You should change `fCC` to all uppercase. ```js -(getUserInput) => { - assert(getUserInput('index').match(/(FCC)/)); - assert(!getUserInput('index').match(/fCC/)); -} +assert.match(code, /(FCC)/); +assert.notMatch(code, /(fCC)/); ``` `FCC` should be a constant variable declared with `const`. @@ -54,14 +52,13 @@ assert.match(code, /const\s+FCC/); `fact` should be declared with `let`. ```js -(getUserInput) => assert(getUserInput('index').match(/(let fact)/g)); +assert.match(code, /(let\s+fact)/g); ``` `console.log` should be changed to print the `FCC` and `fact` variables. ```js -(getUserInput) => - assert(getUserInput('index').match(/console\.log\(\s*FCC\s*\,\s*fact\s*\)\s*;?/g)); +assert.match(code, /console\.log\(\s*FCC\s*\,\s*fact\s*\)\s*;?/g); ``` # --seed-- diff --git a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/explore-differences-between-the-var-and-let-keywords.md b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/explore-differences-between-the-var-and-let-keywords.md index 967177f97e..8e3a1b5975 100644 --- a/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/explore-differences-between-the-var-and-let-keywords.md +++ b/curriculum/challenges/english/02-javascript-algorithms-and-data-structures/basic-javascript/explore-differences-between-the-var-and-let-keywords.md @@ -42,19 +42,19 @@ Update the code so it only uses the `let` keyword. `var` should not exist in the code. ```js -(getUserInput) => assert(!getUserInput('index').match(/var/g)); +assert.notMatch(code, /var/g); ``` `catName` should be the string `Oliver`. ```js -assert(catName === 'Oliver'); +assert.equal(catName, 'Oliver'); ``` `catSound` should be the string `Meow!` ```js -assert(catSound === 'Meow!'); +assert.equal(catSound, 'Meow!'); ``` # --seed--