From e958e0fb5a2a7bcf928be67b71611939bb312a3f Mon Sep 17 00:00:00 2001 From: Krzysztof G <60067306+gikf@users.noreply.github.com> Date: Fri, 19 Jan 2024 02:29:33 +0100 Subject: [PATCH] fix(curriculum): change any character to literal dot (#53246) --- .../64df45a3ad4f8719e5355244.md | 2 +- .../64e3392996b41d17a1375643.md | 2 +- .../63507c19151201368ee3e16c.md | 2 +- .../63507d810f1a2e38f1908fd8.md | 2 +- .../6444ec416a1fe1017e517bd8.md | 2 +- .../644f4bcf1c2afd0211cd945e.md | 2 +- .../657386f11fb8265660bfac75.md | 4 ++-- .../65738cc6cba1825b14806b3d.md | 4 ++-- .../62a3c91a2bab1b4d6fabb726.md | 4 ++-- .../62a3cdb11478a34ff4a6470d.md | 4 ++-- .../62a3cfc8328d3351b95d4f61.md | 4 ++-- .../62a7beb1ad61211ac153707f.md | 4 ++-- .../62a7bf06d2ad9d1c5024e833.md | 6 +++--- .../62a7bfabe119461eb13ccbd6.md | 2 +- .../62a8d0c4f12c2239b6618582.md | 2 +- .../62aa1cea594f152ba626b872.md | 2 +- .../62aa1d9f535e102e4663e7a6.md | 4 ++-- .../62aa264d23cdaa45a20efada.md | 2 +- .../63ec36f6133df7160be3ec66.md | 2 +- .../63f03b1ed5ab15420c057463.md | 2 +- .../653635c731206b718659d3d5.md | 6 +++--- .../654215fe7b4a899ddceb3b60.md | 2 +- .../65422ba173a18b1bedef1bb6.md | 2 +- .../6552127b2576c2fbc5ecc2ea.md | 6 +++--- .../655482742cc5499726e3f347.md | 8 ++++---- .../655483ebf0096ba02b2c3d4c.md | 6 +++--- .../6555d729c9bfd7c3195f1948.md | 8 ++++---- .../657b2b0b6a48071a6db28e7a.md | 4 ++-- .../641da465273051435d332b15.md | 4 ++-- .../641da4b16937be43ba24c63d.md | 14 ++++++------- .../641da51a9810e74411262fcc.md | 20 +++++++++---------- .../641da7bfbc7f0f477438ad8a.md | 6 +++--- .../641dab13c1b6f14b9828e6b1.md | 6 +++--- .../63c21774193de43bbc6a769f.md | 4 ++-- .../63c217ccd939053ce4fa16d6.md | 4 ++-- .../642df32c0c2db433d8b46d46.md | 2 +- .../642e0011c45c893845842058.md | 2 +- .../642e004130958c3975aa3a4a.md | 12 +++++------ .../64345b810a6e481e5e326849.md | 10 +++++----- .../64e4eec13546c06d61a63d59.md | 2 +- .../650048b0764f9c1b798200e2.md | 2 +- .../63e042661ad2663f0d468740.md | 2 +- .../63e050bf935ac341b88326d6.md | 2 +- .../63e05557016dfd45ea49152c.md | 2 +- .../63e05c00b615bb46ac87273a.md | 4 ++-- .../63f293c804d6f9e9a83ca4c5.md | 2 +- .../63f29804e3ec00ea6fab1ec4.md | 4 ++-- .../63e9eb5b2328eed3d194b28a.md | 4 ++-- .../65388ac7154e44b72c74d616.md | 2 +- .../65388bbcbf6928b83fc424d1.md | 4 ++-- .../65388d61a57a00b9ad0d0817.md | 2 +- .../65388edfdf364fbb04e426f2.md | 2 +- .../65389a63d3b1d6c764c0e10e.md | 4 ++-- .../65389eff4893facbbe6eae67.md | 2 +- 54 files changed, 112 insertions(+), 112 deletions(-) diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64df45a3ad4f8719e5355244.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64df45a3ad4f8719e5355244.md index 9951943c73a..924e10a5612 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64df45a3ad4f8719e5355244.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64df45a3ad4f8719e5355244.md @@ -16,7 +16,7 @@ For now, each recursive call prints the `rods` dictionary without performing any You should remove the last element from the `rods[source]` list and append it to the `rods[target]` list before the `print` call. ```js -({ test: () => assert.match(code, /move\(\s*n\s*-\s*1\s*,\s*source\s*,\s*auxiliary\s*,\s*target\s*\)\s+rods\[\s*target\s*\].append\(\s*rods\[\s*source\s*\].pop\(\s*\)\s*\)/) }) +({ test: () => assert.match(code, /move\(\s*n\s*-\s*1\s*,\s*source\s*,\s*auxiliary\s*,\s*target\s*\)\s+rods\[\s*target\s*\]\.append\(\s*rods\[\s*source\s*\]\.pop\(\s*\)\s*\)/) }) ``` # --seed-- diff --git a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64e3392996b41d17a1375643.md b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64e3392996b41d17a1375643.md index 96b7e09fa55..74f1e30bcef 100644 --- a/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64e3392996b41d17a1375643.md +++ b/curriculum/challenges/english/07-scientific-computing-with-python/learn-recursion-by-solving-the-tower-of-hanoi-puzzle/64e3392996b41d17a1375643.md @@ -14,7 +14,7 @@ Before appending the last element to the target, add a comment saying `move the You should add a comment with the provided text before `rods[target].append(rods[source].pop())`. ```js -({ test: () => assert.match(code, /move\(\s*n\s*-\s*1\s*,\s*source\s*,\s*auxiliary\s*,\s*target\s*\)\s+#\s*move\sthe\snth\sdisk\sfrom\ssource\sto\starget\s+(?=rods\[\s*target\s*\].append\(\s*rods\[\s*source\s*\].pop\(\s*\)\s*\))/) }) +({ test: () => assert.match(code, /move\(\s*n\s*-\s*1\s*,\s*source\s*,\s*auxiliary\s*,\s*target\s*\)\s+#\s*move\sthe\snth\sdisk\sfrom\ssource\sto\starget\s+(?=rods\[\s*target\s*\]\.append\(\s*rods\[\s*source\s*\]\.pop\(\s*\)\s*\))/) }) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-advanced-array-methods-by-building-a-statistics-calculator/63507c19151201368ee3e16c.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-advanced-array-methods-by-building-a-statistics-calculator/63507c19151201368ee3e16c.md index ca4b2482b97..79efd11e2f6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-advanced-array-methods-by-building-a-statistics-calculator/63507c19151201368ee3e16c.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-advanced-array-methods-by-building-a-statistics-calculator/63507c19151201368ee3e16c.md @@ -28,7 +28,7 @@ assert.match(calculate.toString(), /array\.map\(\)/); You should assign the result of your `.map()` call to your `numbers` variable. ```js -assert.match(calculate.toString(), /numbers\s*=\s*array.map()/); +assert.match(calculate.toString(), /numbers\s*=\s*array\.map()/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-advanced-array-methods-by-building-a-statistics-calculator/63507d810f1a2e38f1908fd8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-advanced-array-methods-by-building-a-statistics-calculator/63507d810f1a2e38f1908fd8.md index 6fb1811b2c9..8fd20b8f2c5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-advanced-array-methods-by-building-a-statistics-calculator/63507d810f1a2e38f1908fd8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-advanced-array-methods-by-building-a-statistics-calculator/63507d810f1a2e38f1908fd8.md @@ -30,7 +30,7 @@ assert.match(calculate.toString(), /numbers\.filter\(\)/) You should assign the result of `numbers.filter()` to the `filtered` variable. ```js -assert.match(calculate.toString(), /filtered\s*=\s*numbers.filter\(\)/); +assert.match(calculate.toString(), /filtered\s*=\s*numbers\.filter\(\)/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/6444ec416a1fe1017e517bd8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/6444ec416a1fe1017e517bd8.md index cf752880e2e..5c93c46da59 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/6444ec416a1fe1017e517bd8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/6444ec416a1fe1017e517bd8.md @@ -20,7 +20,7 @@ assert.match(code, /\s*const\s+thousands\s*=/); Your should assign `Math.floor(views / 1000)` to your `thousands` variable. ```js -assert.match(code, /\s*const\s+thousands\s*=\s*Math.floor\(views\s*\/\s*1000\)\s*/); +assert.match(code, /\s*const\s+thousands\s*=\s*Math\.floor\(views\s*\/\s*1000\)\s*/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/644f4bcf1c2afd0211cd945e.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/644f4bcf1c2afd0211cd945e.md index e3083965b2d..3d5c6758f8a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/644f4bcf1c2afd0211cd945e.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/644f4bcf1c2afd0211cd945e.md @@ -28,7 +28,7 @@ assert.match(code, /const\s+url\s*=\s*`[\s\S]*`/); You should have the value of `${forumCategoryUrl}${selectedCategory.className}/${id}` inside your template literal. ```js -assert.match(code, /const\s+url\s*=\s*`\$\{forumCategoryUrl\}\$\{selectedCategory.className\}\/\$\{id\}`/); +assert.match(code, /const\s+url\s*=\s*`\$\{forumCategoryUrl\}\$\{selectedCategory\.className\}\/\$\{id\}`/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/657386f11fb8265660bfac75.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/657386f11fb8265660bfac75.md index 77b57838472..3777674f628 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/657386f11fb8265660bfac75.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/657386f11fb8265660bfac75.md @@ -24,7 +24,7 @@ assert.match(code, /const\s+forumLatest\s*=/); You should assign `https://forum-proxy.freecodecamp.rocks/latest` to your `forumLatest` variable. ```js -assert.match(code, /const\s+forumLatest\s*=\s*('|")https:\/\/forum-proxy.freecodecamp.rocks\/latest\1\s*/); +assert.match(code, /const\s+forumLatest\s*=\s*('|")https:\/\/forum-proxy\.freecodecamp\.rocks\/latest\1\s*/); ``` You should declare a `forumTopicUrl` variable with `const`. @@ -36,7 +36,7 @@ assert.match(code, /const\s+forumTopicUrl\s*=/); You should assign `https://forum.freecodecamp.org/t/` to your `forumTopicUrl` variable. ```js -assert.match(code, /const\s+forumTopicUrl\s*=\s*('|")https:\/\/forum.freecodecamp.org\/t\/\1\s*/); +assert.match(code, /const\s+forumTopicUrl\s*=\s*('|")https:\/\/forum\.freecodecamp\.org\/t\/\1\s*/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65738cc6cba1825b14806b3d.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65738cc6cba1825b14806b3d.md index e2538e99d27..f19732236ba 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65738cc6cba1825b14806b3d.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65738cc6cba1825b14806b3d.md @@ -22,7 +22,7 @@ assert.match(code, /const\s+forumCategoryUrl\s*=/); You should assign `https://forum.freecodecamp.org/c/` to your `forumCategoryUrl` variable. ```js -assert.match(code, /const\s+forumCategoryUrl\s*=\s*('|")https:\/\/forum.freecodecamp.org\/c\/\1\s*/); +assert.match(code, /const\s+forumCategoryUrl\s*=\s*('|")https:\/\/forum\.freecodecamp\.org\/c\/\1\s*/); ``` You should declare an `avatarUrl` variable with `const`. @@ -34,7 +34,7 @@ assert.match(code, /const\s+avatarUrl\s*=/); You should assign `https://sea1.discourse-cdn.com/freecodecamp` to your `avatarUrl` variable. ```js -assert.match(code, /const\s+avatarUrl\s*=\s*('|")https:\/\/sea1.discourse-cdn.com\/freecodecamp\1\s*/); +assert.match(code, /const\s+avatarUrl\s*=\s*('|")https:\/\/sea1\.discourse-cdn\.com\/freecodecamp\1\s*/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c91a2bab1b4d6fabb726.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c91a2bab1b4d6fabb726.md index 98a859973b2..4a93c4b6ea3 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c91a2bab1b4d6fabb726.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3c91a2bab1b4d6fabb726.md @@ -26,13 +26,13 @@ assert.isFunction(goCave); You should have a `console.log("Going to cave.");` line in your code. ```js -assert.match(code, /console.log\(('|")Going to cave\.\1\)/); +assert.match(code, /console\.log\(('|")Going to cave\.\1\)/); ``` Your `console.log("Going to cave.");` line should be inside your `goCave` function. ```js -assert.match(goCave.toString(), /console.log\(('|")Going to cave\.\1\)/); +assert.match(goCave.toString(), /console\.log\(('|")Going to cave\.\1\)/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cdb11478a34ff4a6470d.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cdb11478a34ff4a6470d.md index 13c209a0234..72acf3b5a2e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cdb11478a34ff4a6470d.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cdb11478a34ff4a6470d.md @@ -26,13 +26,13 @@ assert.isFunction(fightDragon); You should have a `console.log("Fighting dragon.");` line in your code. ```js -assert.match(code, /console.log\(('|")Fighting dragon\.\1\)/); +assert.match(code, /console\.log\(('|")Fighting dragon\.\1\)/); ``` Your `console.log("Fighting dragon.");` line should be inside your `fightDragon` function. ```js -assert.match(fightDragon.toString(), /console.log\(('|")Fighting dragon\.\1\)/); +assert.match(fightDragon.toString(), /console\.log\(('|")Fighting dragon\.\1\)/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cfc8328d3351b95d4f61.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cfc8328d3351b95d4f61.md index b52c394bffa..bece41b6dea 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cfc8328d3351b95d4f61.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a3cfc8328d3351b95d4f61.md @@ -23,7 +23,7 @@ When a player clicks your `Go to store` button, you want to change the buttons a You should not have a `console.log("Going to store.");` line in your code. ```js -assert.notMatch(code, /console.log\(('|")Going to store\.\1\)/); +assert.notMatch(code, /console\.log\(('|")Going to store\.\1\)/); ``` You should use dot notation to access the `innerText` property of `button1`. @@ -35,7 +35,7 @@ assert.match(code, /button1\.innerText/); You should not use `let` or `const` to access the `innerText` property of `button1`. ```js -assert.notMatch(code, /(let|const)\s+button1.innerText/); +assert.notMatch(code, /(let|const)\s+button1\.innerText/); ``` You should update the `innerText` property of `button1` to be `Buy 10 health (10 gold)`. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md index e711032de9b..95e72054b36 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7beb1ad61211ac153707f.md @@ -20,7 +20,7 @@ assert.match(code, /button2\.innerText/); You should not use `let` or `const` to access the `innerText` property of `button2`. ```js -assert.notMatch(code, /(let|const)\s+button2.innerText/); +assert.notMatch(code, /(let|const)\s+button2\.innerText/); ``` You should update the `innerText` property of `button2` to be `Buy weapon (30 gold)`. @@ -44,7 +44,7 @@ assert.match(code, /button3\.innerText/); You should not use `let` or `const` to access the `innerText` property of `button3`. ```js -assert.notMatch(code, /(let|const)\s+button3.innerText/); +assert.notMatch(code, /(let|const)\s+button3\.innerText/); ``` You should update the `innerText` property of `button3` to be `Go to town square`. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md index ece7e119212..dbd739fbb44 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bf06d2ad9d1c5024e833.md @@ -22,7 +22,7 @@ assert.match(code, /button1\.onclick/); You should not use `let` or `const` to access the `onclick` property of `button1`. ```js -assert.notMatch(code, /(let|const)\s+button1.onclick/); +assert.notMatch(code, /(let|const)\s+button1\.onclick/); ``` You should set the `onclick` property of `button1` to be `buyHealth`. @@ -46,7 +46,7 @@ assert.match(code, /button2\.onclick/); You should not use `let` or `const` to access the `onclick` property of `button2`. ```js -assert.notMatch(code, /(let|const)\s+button2.onclick/); +assert.notMatch(code, /(let|const)\s+button2\.onclick/); ``` You should set the `onclick` property of `button2` to be `buyWeapon`. @@ -70,7 +70,7 @@ assert.match(code, /button3\.onclick/); You should not use `let` or `const` to access the `onclick` property of `button3`. ```js -assert.notMatch(code, /(let|const)\s+button3.onclick/); +assert.notMatch(code, /(let|const)\s+button3\.onclick/); ``` You should set the `onclick` property of `button3` to be `goTown`. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bfabe119461eb13ccbd6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bfabe119461eb13ccbd6.md index da4e2e8d98f..05dcfdca091 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bfabe119461eb13ccbd6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a7bfabe119461eb13ccbd6.md @@ -20,7 +20,7 @@ assert.match(code, /text\.innerText/); You should not use `let` or `const` to access the `innerText` property of `text`. ```js -assert.notMatch(code, /(let|const)\s+text.innerText/); +assert.notMatch(code, /(let|const)\s+text\.innerText/); ``` You should update the `innerText` property of `text` to be `You enter the store.`. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0c4f12c2239b6618582.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0c4f12c2239b6618582.md index a7675610790..3d763c8414a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0c4f12c2239b6618582.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62a8d0c4f12c2239b6618582.md @@ -27,7 +27,7 @@ assert.isAbove(split.indexOf('else'), split.indexOf('if')); You should set `text.innerText` to `You do not have enough gold to buy a weapon.`. ```js -assert.match(buyWeapon.toString(), /text.innerText\s*=\s*('|")You do not have enough gold to buy a weapon.\1/); +assert.match(buyWeapon.toString(), /text\.innerText\s*=\s*('|")You do not have enough gold to buy a weapon.\1/); ``` Your `else` statement should set `text.innerText` to `You do not have enough gold to buy a weapon.`. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1cea594f152ba626b872.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1cea594f152ba626b872.md index 93e79dd7e09..8214d5dbf0f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1cea594f152ba626b872.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1cea594f152ba626b872.md @@ -16,7 +16,7 @@ Inside your `attack` function, change your `health -= monsters[fighting].level;` You should update your `health` line to be `health -= getMonsterAttackValue(monsters[fighting].level);`. ```js -assert.match(attack.toString(), /health\s*-=\s*getMonsterAttackValue\(monsters\[fighting\].level\)/); +assert.match(attack.toString(), /health\s*-=\s*getMonsterAttackValue\(monsters\[fighting\]\.level\)/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1d9f535e102e4663e7a6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1d9f535e102e4663e7a6.md index fff74aa2c7c..a0adfe98005 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1d9f535e102e4663e7a6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa1d9f535e102e4663e7a6.md @@ -22,13 +22,13 @@ assert.match(code, /const\s+hit/); You should use the equation `(level * 5) - (Math.floor(Math.random() * xp))`. ```js -assert.match(getMonsterAttackValue, /(level\s*\*\s*5)\s*-\s*(Math.floor\(Math.random\(\)\s*\*\s*xp\))/); +assert.match(getMonsterAttackValue, /(level\s*\*\s*5)\s*-\s*(Math\.floor\(Math\.random\(\)\s*\*\s*xp\))/); ``` You should set `hit` to the value of `(level * 5) - (Math.floor(Math.random() * xp))`. ```js -assert.match(code, /hit\s*=\s*\(level\s*\*\s*5\)\s*-\s*\(Math.floor\(Math.random\(\)\s*\*\s*xp\)\)/); +assert.match(code, /hit\s*=\s*\(level\s*\*\s*5\)\s*-\s*\(Math\.floor\(Math\.random\(\)\s*\*\s*xp\)\)/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa264d23cdaa45a20efada.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa264d23cdaa45a20efada.md index 2ace3d3bbb5..a19fbf11b7d 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa264d23cdaa45a20efada.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-javascript-by-building-a-role-playing-game/62aa264d23cdaa45a20efada.md @@ -30,7 +30,7 @@ assert.match(pick.toString(), /while\s*\(/); Your `while` loop should run while `numbers.length < 10`. ```js -assert.match(pick.toString(), /while\s*\(\s*numbers.length\s*<\s*10\s*\)/); +assert.match(pick.toString(), /while\s*\(\s*numbers\.length\s*<\s*10\s*\)/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-oop-by-building-a-shopping-cart/63ec36f6133df7160be3ec66.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-oop-by-building-a-shopping-cart/63ec36f6133df7160be3ec66.md index e9a2c069456..4fa63646175 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-oop-by-building-a-shopping-cart/63ec36f6133df7160be3ec66.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-oop-by-building-a-shopping-cart/63ec36f6133df7160be3ec66.md @@ -22,7 +22,7 @@ assert.match(code, /\{\s*name\s*,\s*id\s*,\s*price\s*,\s*category\s*\}/); Your destructuring should be the first parameter of the callback function. ```js -assert.match(code, /products.forEach\(\s*\(\s*\{\s*name\s*,\s*id\s*,\s*price\s*,\s*category\s*\}\s*\)\s*=>/); +assert.match(code, /products\.forEach\(\s*\(\s*\{\s*name\s*,\s*id\s*,\s*price\s*,\s*category\s*\}\s*\)\s*=>/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-oop-by-building-a-shopping-cart/63f03b1ed5ab15420c057463.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-oop-by-building-a-shopping-cart/63f03b1ed5ab15420c057463.md index 913c5c53bdb..c1874000bec 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-oop-by-building-a-shopping-cart/63f03b1ed5ab15420c057463.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-oop-by-building-a-shopping-cart/63f03b1ed5ab15420c057463.md @@ -32,7 +32,7 @@ assert.match(code, /clearCartBtn\.addEventListener\(\s*('|"|`)click\1\s*,/); Your event listener should take `cart.clearCart.bind(cart)` as the callback. ```js -assert.match(code, /clearCartBtn\.addEventListener\(\s*('|"|`)click\1\s*,\s*cart\.clearCart\s*.bind\(\s*cart\s*\)\s*\)/); +assert.match(code, /clearCartBtn\.addEventListener\(\s*('|"|`)click\1\s*,\s*cart\.clearCart\s*\.bind\(\s*cart\s*\)\s*\)/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/653635c731206b718659d3d5.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/653635c731206b718659d3d5.md index 61f21115b16..fbda796d85a 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/653635c731206b718659d3d5.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/653635c731206b718659d3d5.md @@ -16,19 +16,19 @@ Also, set the `audio.title` property equal to `song.title`. This tells the audio You should not modify the exist `playSong` function and its content. ```js -assert.match(code, /const\s+playSong\s*=\s*\(id\)\s*=>\s*\{\s*const\s+song\s*=\s*userData\?\.songs\.find\(\(song\)\s=>\s*song.id\s===\s*id\);?/) +assert.match(code, /const\s+playSong\s*=\s*\(id\)\s*=>\s*\{\s*const\s+song\s*=\s*userData\?\.songs\.find\(\(song\)\s=>\s*song\.id\s===\s*id\);?/) ``` You should set `audio.src` to `song.src`. ```js -assert.match(code, /const\s+playSong\s*=\s*\(id\)\s*=>\s*\{\s*const\s+song\s*=\s*userData\?\.songs\.find\(\(song\)\s=>\s*song.id\s===\s*id\);?\s*audio\.src\s*=\s*song\.src;?/) +assert.match(code, /const\s+playSong\s*=\s*\(id\)\s*=>\s*\{\s*const\s+song\s*=\s*userData\?\.songs\.find\(\(song\)\s=>\s*song\.id\s===\s*id\);?\s*audio\.src\s*=\s*song\.src;?/) ``` You should set `audio.title` to `song.title`. ```js -assert.match(code, /const\s+playSong\s*=\s*\(id\)\s*=>\s*\{\s*const\s+song\s*=\s*userData\?\.songs\.find\(\(song\)\s=>\s*song.id\s===\s*id\);?\s*audio\.src\s*=\s*song\.src;?\s*audio\.title\s*=\s*song\.title;?\s*\};?/) +assert.match(code, /const\s+playSong\s*=\s*\(id\)\s*=>\s*\{\s*const\s+song\s*=\s*userData\?\.songs\.find\(\(song\)\s=>\s*song\.id\s===\s*id\);?\s*audio\.src\s*=\s*song\.src;?\s*audio\.title\s*=\s*song\.title;?\s*\};?/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/654215fe7b4a899ddceb3b60.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/654215fe7b4a899ddceb3b60.md index bffbaf503bc..6d3a7016b61 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/654215fe7b4a899ddceb3b60.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/654215fe7b4a899ddceb3b60.md @@ -24,7 +24,7 @@ Chain the `join()` method to your `map()` method and pass in an empty string for You should add `join("")` to the existing code. ```js -assert.match(code, /\s*\s*\s*\s*<\/svg>\s*<\/button>\s*<\/li>\s*`;?\s*\}\)\s*.join\(('|")\3\);?/) +assert.match(code, /\s*\s*\s*\s*<\/svg>\s*<\/button>\s*<\/li>\s*`;?\s*\}\)\s*\.join\(('|")\3\);?/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/65422ba173a18b1bedef1bb6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/65422ba173a18b1bedef1bb6.md index 4aaac3d1863..aa305a2eccb 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/65422ba173a18b1bedef1bb6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/65422ba173a18b1bedef1bb6.md @@ -22,7 +22,7 @@ assert.match(code, /if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{/) You should call the `playSong` function with `userData?.songs[0].id` inside your `if` block. ```js -assert.match(code, /if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{\s*playSong\(userData\?.songs\[0\]\.id\);?\s*\}/) +assert.match(code, /if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{\s*playSong\(userData\?\.songs\[0\]\.id\);?\s*\}/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6552127b2576c2fbc5ecc2ea.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6552127b2576c2fbc5ecc2ea.md index 60202d2804e..d2cdabaaf3b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6552127b2576c2fbc5ecc2ea.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6552127b2576c2fbc5ecc2ea.md @@ -16,20 +16,20 @@ This ensures that the currently playing song will continue to play when the play You should not modify the existing `if` statement and its content. ```js -assert.match(code, /if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{\s*playSong\(userData\?.songs\[0\]\.id\);?\s*\}/) +assert.match(code, /if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{\s*playSong\(userData\?\.songs\[0\]\.id\);?\s*\}/) ``` You should add an `else` block to your `if` statement. ```js -assert.match(code, /if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{\s*playSong\(userData\?.songs\[0\]\.id\);?\s*\}\s*else\s*\{/) +assert.match(code, /if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{\s*playSong\(userData\?\.songs\[0\]\.id\);?\s*\}\s*else\s*\{/) ``` You should call the `playSong` function with `userData?.currentSong.id` in the `else` block of your `if` statement. ```js -assert.match(code, /if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{\s*playSong\(userData\?.songs\[0\]\.id\);?\s*\}\s*else\s*\{\s*playSong\(userData\?\.currentSong\.id\);?\s*\}/) +assert.match(code, /if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{\s*playSong\(userData\?\.songs\[0\]\.id\);?\s*\}\s*else\s*\{\s*playSong\(userData\?\.currentSong\.id\);?\s*\}/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/655482742cc5499726e3f347.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/655482742cc5499726e3f347.md index 1074b904cb6..9e154e1cf0f 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/655482742cc5499726e3f347.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/655482742cc5499726e3f347.md @@ -22,25 +22,25 @@ assert.match(code, /const\s+playPreviousSong\s*=\s*\(\)\s*=>\s*\{\s*/) You should have an `if` statement with the condition `userData?.currentSong === null` inside your `playPreviousSong` function. ```js -assert.match(code, /const\s+playPreviousSong\s*=\s*\(\)\s*=>\s*\{\s*if\s*\(userData\?.currentSong\s*===\s*null\)\s*\{?\s*/) +assert.match(code, /const\s+playPreviousSong\s*=\s*\(\)\s*=>\s*\{\s*if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{?\s*/) ``` You should have `return` inside the block of your `if` statement. ```js -assert.match(code, /const\s+playPreviousSong\s*=\s*\(\)\s*=>\s*\{\s*if\s*\(userData\?.currentSong\s*===\s*null\)\s*\{?\s*return;?\s*\}?/) +assert.match(code, /const\s+playPreviousSong\s*=\s*\(\)\s*=>\s*\{\s*if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{?\s*return;?\s*\}?/) ``` Your `if` statement should have an `else` block. ```js -assert.match(code, /const\s+playPreviousSong\s*=\s*\(\)\s*=>\s*\{\s*if\s*\(userData\?.currentSong\s*===\s*null\)\s*\{?\s*return;?\s*\}?\s*else\s*\{\s*/) +assert.match(code, /const\s+playPreviousSong\s*=\s*\(\)\s*=>\s*\{\s*if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{?\s*return;?\s*\}?\s*else\s*\{\s*/) ``` You should call `getCurrentSongIndex` and assign it to `currentSongIndex` inside the `else` block of your `if` statement. ```js -assert.match(code, /const\s+playPreviousSong\s*=\s*\(\)\s*=>\s*\{\s*if\s*\(userData\?.currentSong\s*===\s*null\)\s*\{?\s*return;?\s*\}?\s*else\s*\{\s*const\s+currentSongIndex\s*=\s*getCurrentSongIndex\(\);?\s*/) +assert.match(code, /const\s+playPreviousSong\s*=\s*\(\)\s*=>\s*\{\s*if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{?\s*return;?\s*\}?\s*else\s*\{\s*const\s+currentSongIndex\s*=\s*getCurrentSongIndex\(\);?\s*/) ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/655483ebf0096ba02b2c3d4c.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/655483ebf0096ba02b2c3d4c.md index c7eaeb789cf..61538871b94 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/655483ebf0096ba02b2c3d4c.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/655483ebf0096ba02b2c3d4c.md @@ -14,19 +14,19 @@ To get the previous song, subtract `1` from the `currentSongIndex` of `userData? You should not modify the existing `if` statement and its content. ```js -assert.match(code, /if\s*\(userData\?.currentSong\s*===\s*null\)\s*\{?\s*return;?\s*\}?\s*else\s*\{\s*const\s+currentSongIndex\s*=\s*getCurrentSongIndex\(\);?\s*/) +assert.match(code, /if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{?\s*return;?\s*\}?\s*else\s*\{\s*const\s+currentSongIndex\s*=\s*getCurrentSongIndex\(\);?\s*/) ``` You should assign `userData?.songs[currentSongIndex - 1]` to a `previousSong` constant. ```js -assert.match(code, /if\s*\(userData\?.currentSong\s*===\s*null\)\s*\{?\s*return;?\s*\}?\s*else\s*\{\s*const\s+currentSongIndex\s*=\s*getCurrentSongIndex\(\);?\s*const\s+previousSong\s*=\s*userData\?\.songs\[currentSongIndex\s*-\s*1\];?\s*/) +assert.match(code, /if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{?\s*return;?\s*\}?\s*else\s*\{\s*const\s+currentSongIndex\s*=\s*getCurrentSongIndex\(\);?\s*const\s+previousSong\s*=\s*userData\?\.songs\[currentSongIndex\s*-\s*1\];?\s*/) ``` You should call the `playSong` function with `previousSong.id`. ```js -assert.match(code, /if\s*\(userData\?.currentSong\s*===\s*null\)\s*\{?\s*return;?\s*\}?\s*else\s*\{\s*const\s+currentSongIndex\s*=\s*getCurrentSongIndex\(\);?\s*const\s+previousSong\s*=\s*userData\?\.songs\[currentSongIndex\s*-\s*1\];?\s*playSong\(previousSong\.id\);?\s*\}/) +assert.match(code, /if\s*\(userData\?\.currentSong\s*===\s*null\)\s*\{?\s*return;?\s*\}?\s*else\s*\{\s*const\s+currentSongIndex\s*=\s*getCurrentSongIndex\(\);?\s*const\s+previousSong\s*=\s*userData\?\.songs\[currentSongIndex\s*-\s*1\];?\s*playSong\(previousSong\.id\);?\s*\}/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6555d729c9bfd7c3195f1948.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6555d729c9bfd7c3195f1948.md index 9f1d7b1e5b6..42179fed148 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6555d729c9bfd7c3195f1948.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/6555d729c9bfd7c3195f1948.md @@ -27,25 +27,25 @@ Then, use a `ternary` operator to check if `currentArtist` is truthy. If so, imp You should chain the `textContent` property to `playingSong`. ```js -assert.match(code, /playingSong.textContent\s*/) +assert.match(code, /playingSong\.textContent\s*/) ``` You should use the `ternary` operator to set the `textContent` property of `playingSong` to `currentTitle` or `""`. ```js -assert.match(code, /playingSong.textContent\s*=\s*currentTitle\s*\?\s*currentTitle\s*:\s*('|")\1;?/) +assert.match(code, /playingSong\.textContent\s*=\s*currentTitle\s*\?\s*currentTitle\s*:\s*('|")\1;?/) ``` You should chain the `textContent` property to `songArtist`. ```js -assert.match(code, /songArtist.textContent\s*/) +assert.match(code, /songArtist\.textContent\s*/) ``` You should use the `ternary` operator to set the `textContent` property of `songArtist` to `currentArtist` or `""`. ```js -assert.match(code, /songArtist.textContent\s*=\s*currentArtist\s*\?\s*currentArtist\s*:\s*('|")\1;?/) +assert.match(code, /songArtist\.textContent\s*=\s*currentArtist\s*\?\s*currentArtist\s*:\s*('|")\1;?/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/657b2b0b6a48071a6db28e7a.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/657b2b0b6a48071a6db28e7a.md index ed9301c0aab..c296672cdfd 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/657b2b0b6a48071a6db28e7a.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-basic-string-and-array-methods-by-building-a-music-player/657b2b0b6a48071a6db28e7a.md @@ -23,13 +23,13 @@ Pass in a callback function to the `map()` method. The callback function should The callback function of your `map()` method should use arrow function syntax. ```js -assert.match(code, /const\s+songsHTML\s*=\s*array.map\(\(?.*\)?\s*=>\s*\{\s*\}\)/) +assert.match(code, /const\s+songsHTML\s*=\s*array\.map\(\(?.*\)?\s*=>\s*\{\s*\}\)/) ``` Your `map()` method should have a `song` parameter in it's callback function. ```js -assert.match(code, /const\s+songsHTML\s*=\s*array.map\(\(?song\)?/) +assert.match(code, /const\s+songsHTML\s*=\s*array\.map\(\(?song\)?/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da465273051435d332b15.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da465273051435d332b15.md index 42b89340308..c90609380f5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da465273051435d332b15.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da465273051435d332b15.md @@ -22,13 +22,13 @@ assert.notMatch(code, /\.then\(\(?res\)?\s*=>\s*console\.log\(res\)\)/) You should implicitly return `res.json()` in your `.then()`. ```js -assert.match(code, /\.then\(\(?res\)?\s*=>\s*res.json\(\)\)/) +assert.match(code, /\.then\(\(?res\)?\s*=>\s*res\.json\(\)\)/) ``` You should not have a semi-colon after your `.then()`. ```js -assert.notMatch(code, /\.then\(\(?res\)?\s*=>\s*res.json\(\)\);/) +assert.notMatch(code, /\.then\(\(?res\)?\s*=>\s*res\.json\(\)\);/) ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da4b16937be43ba24c63d.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da4b16937be43ba24c63d.md index 15a2f427d6b..ad986121260 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da4b16937be43ba24c63d.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da4b16937be43ba24c63d.md @@ -23,43 +23,43 @@ assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/ Your first `.then()` should not have a semi-colon. ```js -assert.notMatch(code, /\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\);/) +assert.notMatch(code, /\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\);/) ``` You should chain another `.then()` to the existing `.then()`. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(/) ``` You should add a `data` parameter to your second `.then()` method. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)/) ``` Your second `.then()` method should use arrow function syntax. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*/) ``` Your second `.then()` method should have curly braces. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*/) ``` Your second `.then()` method should log `data` to the console. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\)\s*;?\s*\}\s*\)/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\)\s*;?\s*\}\s*\)/) ``` Your second `.then()` should not not have semi-colon after it. ```js -assert.notMatch(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\)\s*;?\s*\}\s*\)\s*;/) +assert.notMatch(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\)\s*;?\s*\}\s*\)\s*;/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da51a9810e74411262fcc.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da51a9810e74411262fcc.md index a906ce3eeda..5973ce894ea 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da51a9810e74411262fcc.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da51a9810e74411262fcc.md @@ -24,61 +24,61 @@ assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/ You should chain another `.then()` to the existing `.then()`. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(/) ``` You should add a `data` parameter to your second `.then()` method. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)/) ``` Your second `.then()` method should use arrow function syntax. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*/) ``` Your second `.then()` method should have curly braces. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*/) ``` Your second `.then()` method should log `data` to the console. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\);?\n?\s*\}\)/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\);?\n?\s*\}\)/) ``` Your second `.then()` should not have a semicolon. ```js -assert.notMatch(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\);?\n?\s*\}\);/) +assert.notMatch(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\);?\n?\s*\}\);/) ``` You should chain the `.catch()` method to the second `.then()` you already have. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\);?\n?\s*\}\s*\)\n?\s*\.catch\(/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\);?\n?\s*\}\s*\)\n?\s*\.catch\(/) ``` You should add an `err` parameter to your `.catch()` method. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\);?\n?\s*\}\s*\)\n?\s*\.catch\(\s*(\(\s*err\s*\)|err)/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\);?\n?\s*\}\s*\)\n?\s*\.catch\(\s*(\(\s*err\s*\)|err)/) ``` Your `.catch()` method should have an arrow function syntax. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\);?\n?\s*\}\s*\)\n?\s*\.catch\(\s*(\(\s*err\s*\)|err)\s*=>\s*\{?/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\);?\n?\s*\}\s*\)\n?\s*\.catch\(\s*(\(\s*err\s*\)|err)\s*=>\s*\{?/) ``` Your `.catch()` method should use `console.error()` to log `err` to the console with the text `` `There was an error: ${err}` ``. Don't forget to use backticks. ```js -assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\);?\n?\s*\}\s*\)\n?\s*\.catch\(\s*(\(\s*err\s*\)|err)\s*=>\s*\{?\n?(\s*)?console\.error\(\s*`There\swas\san\serror:\s?\$\{\s*err\s*\}`\s*\);?\n?(\s*)?\}?\)\s*;?/) +assert.match(code, /fetch\(('|"|`)https:\/\/cdn\.freecodecamp\.org\/curriculum\/news\-author\-page\/authors\.json\1\)\s*\.then\(\s*(\(\s*res\s*\)|res)\s*=>\s*res\.json\(\s*\)\s*\)\s*\.then\(\s*(\(\s*data\s*\)|data)\s*=>\s*\{\s*\n?\s*?console\.log\(\s*data\s*\);?\n?\s*\}\s*\)\n?\s*\.catch\(\s*(\(\s*err\s*\)|err)\s*=>\s*\{?\n?(\s*)?console\.error\(\s*`There\swas\san\serror:\s?\$\{\s*err\s*\}`\s*\);?\n?(\s*)?\}?\)\s*;?/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da7bfbc7f0f477438ad8a.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da7bfbc7f0f477438ad8a.md index afeba760e74..cd6a4d416fc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da7bfbc7f0f477438ad8a.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641da7bfbc7f0f477438ad8a.md @@ -34,19 +34,19 @@ assert.match(code, /displayAuthors\(/) You should call your `displayAuthors` function and pass in an argument of `authorDataArr.slice()`. ```js -assert.match(code, /displayAuthors\(authorDataArr.slice\(/) +assert.match(code, /displayAuthors\(authorDataArr\.slice\(/) ``` The first parameter of your `slice()` method should be `startingIndex`. ```js -assert.match(code, /displayAuthors\(authorDataArr.slice\(startingIndex/) +assert.match(code, /displayAuthors\(authorDataArr\.slice\(startingIndex/) ``` The second parameter of your `slice()` method should be `endingIndex`. ```js -assert.match(code, /displayAuthors\(authorDataArr.slice\(startingIndex\,\s*endingIndex\)\);?/) +assert.match(code, /displayAuthors\(authorDataArr\.slice\(startingIndex\,\s*endingIndex\)\);?/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641dab13c1b6f14b9828e6b1.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641dab13c1b6f14b9828e6b1.md index faeaa6ee9db..160cf24ddc5 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641dab13c1b6f14b9828e6b1.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-fetch-and-promises-by-building-an-fcc-authors-page/641dab13c1b6f14b9828e6b1.md @@ -18,19 +18,19 @@ With that, your author page is complete! You should access the `style` property of `loadMoreBtn` with a dot notation. ```js -assert.match(code, /loadMoreBtn.style/) +assert.match(code, /loadMoreBtn\.style/) ``` You should access `cursor` from the `style` property with dot notation. ```js -assert.match(code, /loadMoreBtn.style.cursor/) +assert.match(code, /loadMoreBtn\.style\.cursor/) ``` You should set the value of the `cursor` property to `not-allowed`. ```js -assert.match(code, /loadMoreBtn.style.cursor\s*=\s*('|"|`)not\-allowed\1;?/) +assert.match(code, /loadMoreBtn\.style\.cursor\s*=\s*('|"|`)not\-allowed\1;?/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21774193de43bbc6a769f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21774193de43bbc6a769f.md index a73a75ff7eb..2da151de390 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21774193de43bbc6a769f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c21774193de43bbc6a769f.md @@ -14,13 +14,13 @@ Give your `label` element a `for` attribute with the value `X-#-name`, where `X` Your `label` element should have a `for` attribute set to `${entryDropdown.value}-${entryNumber}-name`. ```js -assert.match(code, /HTMLString\s*=\s*`\n\s*/) +assert.match(code, /HTMLString\s*=\s*`\n\s*/) ``` Your `label` element should have the same text as before. ```js -assert.match(code, /HTMLString\s*=\s*`\n\s*Entry\s\$\{entryNumber\}\sName<\/label>/); +assert.match(code, /HTMLString\s*=\s*`\n\s*Entry\s\$\{entryNumber\}\sName<\/label>/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c217ccd939053ce4fa16d6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c217ccd939053ce4fa16d6.md index 826f59e3bbc..1c2005f1596 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c217ccd939053ce4fa16d6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-form-validation-by-building-a-calorie-counter/63c217ccd939053ce4fa16d6.md @@ -14,13 +14,13 @@ After your `label` element, and on a new line in your template string, create an You should not modify your `label` element. ```js -assert.match(code, /HTMLString\s*=\s*`\n\s*Entry\s\$\{entryNumber\}\sName<\/label>/); +assert.match(code, /HTMLString\s*=\s*`\n\s*Entry\s\$\{entryNumber\}\sName<\/label>/); ``` You should add an `input` element on a new line. ```js -assert.match(code, /HTMLString\s*=\s*`\n\s*Entry\s\$\{entryNumber\}\sName<\/label>\n\s*Entry\s\$\{entryNumber\}\sName<\/label>\n\s*\s*Array\( You should pass `start` to the `.fill()` method. ```js -assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\).fill\(\s*start\s*\)/); +assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\)\.fill\(\s*start\s*\)/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e004130958c3975aa3a4a.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e004130958c3975aa3a4a.md index 2c69829a98b..0c6f21fff3c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e004130958c3975aa3a4a.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/642e004130958c3975aa3a4a.md @@ -22,37 +22,37 @@ assert.match(code, /\.map\(/); You should chain the `.map()` method to your `.fill()` method. ```js -assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\).fill\(\s*start\s*\)\.map\(/); +assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\)\.fill\(\s*start\s*\)\.map\(/); ``` You should pass a callback function to `.map()` using arrow syntax. ```js -assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\).fill\(\s*start\s*\)\.map\(\s*\(.*\)\s*=>/); +assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\)\.fill\(\s*start\s*\)\.map\(\s*\(.*\)\s*=>/); ``` Your `.map()` callback should take `element` as the first parameter. ```js -assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\).fill\(\s*start\s*\)\.map\(\s*\(\s*element/); +assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\)\.fill\(\s*start\s*\)\.map\(\s*\(\s*element/); ``` Your `.map()` callback should take `index` as the second parameter. ```js -assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\).fill\(\s*start\s*\)\.map\(\s*\(\s*element\s*,\s*index\s*\)\s*=>/); +assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\)\.fill\(\s*start\s*\)\.map\(\s*\(\s*element\s*,\s*index\s*\)\s*=>/); ``` Your `.map()` callback should use an implicit return. ```js -assert.notMatch(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\).fill\(\s*start\s*\)\.map\(\s*\(\s*element\s*,\s*index\s*\)\s*=>\s*\{/); +assert.notMatch(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\)\.fill\(\s*start\s*\)\.map\(\s*\(\s*element\s*,\s*index\s*\)\s*=>\s*\{/); ``` Your `.map()` callback should implicitly return the sum of `element` and `index`. ```js -assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\).fill\(\s*start\s*\)\.map\(\s*\(\s*element\s*,\s*index\s*\)\s*=>\s*(element\s*\+\s*index|index\s*\+\s*element)/); +assert.match(code, /const\s+range\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*Array\(\s*end\s*-\s*start\s*\+\s*1\s*\)\.fill\(\s*start\s*\)\.map\(\s*\(\s*element\s*,\s*index\s*\)\s*=>\s*(element\s*\+\s*index|index\s*\+\s*element)/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345b810a6e481e5e326849.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345b810a6e481e5e326849.md index 276907fe638..0586cdbf860 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345b810a6e481e5e326849.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-functional-programming-by-building-a-spreadsheet/64345b810a6e481e5e326849.md @@ -28,31 +28,31 @@ assert.match(code, /const\s+charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*ran You should use arrow syntax for the `.map()` callback. ```js -assert.match(code, /const\s+charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\).map\(\s*(\(.*\)|[^\s()]+)\s*=>/); +assert.match(code, /const\s+charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\)\.map\(\s*(\(.*\)|[^\s()]+)\s*=>/); ``` Your `.map()` callback should take a `code` parameter. ```js -assert.match(code, /const\s+charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\).map\(\s*(\(\s*code\s*\)|code)\s*=>/); +assert.match(code, /const\s+charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\)\.map\(\s*(\(\s*code\s*\)|code)\s*=>/); ``` Your `.map()` callback should use an implicit return. ```js -assert.notMatch(code, /const\s+charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\).map\(\s*(\(\s*code\s*\)|code)\s*=>\s*\{/); +assert.notMatch(code, /const\s+charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\)\.map\(\s*(\(\s*code\s*\)|code)\s*=>\s*\{/); ``` Your `.map()` callback should return the result of calling `String.fromCharCode()`. ```js -assert.match(code, /const\s+charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\).map\(\s*(\(\s*code\s*\)|code)\s*=>\s*String\.fromCharCode\(/); +assert.match(code, /const\s+charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\)\.map\(\s*(\(\s*code\s*\)|code)\s*=>\s*String\.fromCharCode\(/); ``` You should pass the variable `code` to `String.fromCharCode()`. ```js -assert.match(code, /const\s+charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\).map\(\s*(\(\s*code\s*\)|code)\s*=>\s*String\.fromCharCode\(\s*code\s*\)/); +assert.match(code, /const\s+charRange\s*=\s*\(\s*start\s*,\s*end\s*\)\s*=>\s*range\(\s*start\.charCodeAt\(\s*0\s*\)\s*,\s*end\.charCodeAt\(\s*0\s*\)\s*\)\.map\(\s*(\(\s*code\s*\)|code)\s*=>\s*String\.fromCharCode\(\s*code\s*\)/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4eec13546c06d61a63d59.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4eec13546c06d61a63d59.md index c9794ade15b..cbfa28e97bc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4eec13546c06d61a63d59.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/64e4eec13546c06d61a63d59.md @@ -41,7 +41,7 @@ assert.match(code, /const\s+dataArrIndex\s*=\s*taskData\.findIndex\(\(?item\)?/) Your arrow function callback should check if `item.id === currentTask.id`. ```js -assert.match(code, /const\s+dataArrIndex\s*=\s*taskData\.findIndex\(\(?item\)?\s*=>\s*item.id\s*===\s*currentTask.id\s*\);?/) +assert.match(code, /const\s+dataArrIndex\s*=\s*taskData\.findIndex\(\(?item\)?\s*=>\s*item\.id\s*===\s*currentTask\.id\s*\);?/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/650048b0764f9c1b798200e2.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/650048b0764f9c1b798200e2.md index 083fa8593ae..8d9473d11e1 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/650048b0764f9c1b798200e2.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-localstorage-by-building-a-todo-app/650048b0764f9c1b798200e2.md @@ -16,7 +16,7 @@ Set `taskData` to the retrieval of `data` from local storage **or** an empty arr You should set the `taskData` variable to `JSON.parse(localStorage.getItem("data")) || [];`. ```js -assert.match(code, /const\s+taskData\s*=\s*JSON.parse\(localStorage\.getItem\(('|")data\1\)\)\s*\|\|\s*\[\];?/) +assert.match(code, /const\s+taskData\s*=\s*JSON\.parse\(localStorage\.getItem\(('|")data\1\)\)\s*\|\|\s*\[\];?/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e042661ad2663f0d468740.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e042661ad2663f0d468740.md index 95eda5017a7..dff305f1421 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e042661ad2663f0d468740.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e042661ad2663f0d468740.md @@ -15,7 +15,7 @@ Use object destructuring to access the `coachName` value. ```js -assert.match(code, /const\s*{\s*coachName\s*}\s*=\s*myFavoriteFootballTeam.headCoach\s*/) +assert.match(code, /const\s*{\s*coachName\s*}\s*=\s*myFavoriteFootballTeam\.headCoach\s*/) ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e050bf935ac341b88326d6.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e050bf935ac341b88326d6.md index d670a21772e..e5add33af5b 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e050bf935ac341b88326d6.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e050bf935ac341b88326d6.md @@ -19,7 +19,7 @@ You should assign the `sport` variable to `typeOfSport.textContent`. ```js -assert.match(code, /typeOfSport.textContent\s*=\s*sport\s*/) +assert.match(code, /typeOfSport\.textContent\s*=\s*sport\s*/) ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e05557016dfd45ea49152c.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e05557016dfd45ea49152c.md index 5cc5f8aed86..891f824c094 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e05557016dfd45ea49152c.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e05557016dfd45ea49152c.md @@ -15,7 +15,7 @@ You should assign the `team` variable to `teamName.textContent`. ```js -assert.match(code, /teamName.textContent\s*=\s*team\s*/) +assert.match(code, /teamName\.textContent\s*=\s*team\s*/) ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e05c00b615bb46ac87273a.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e05c00b615bb46ac87273a.md index 5580fbb54a2..e27fd30c2f2 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e05c00b615bb46ac87273a.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63e05c00b615bb46ac87273a.md @@ -19,7 +19,7 @@ You should assign the `year` variable to `worldCupYear.textContent`. ```js -assert.match(code, /worldCupYear.textContent\s*=\s*year\s*/) +assert.match(code, /worldCupYear\.textContent\s*=\s*year\s*/) ``` @@ -27,7 +27,7 @@ You should assign the `coachName` variable to `headCoach.textContent`. ```js -assert.match(code, /headCoach.textContent\s*=\s*coachName\s*/) +assert.match(code, /headCoach\.textContent\s*=\s*coachName\s*/) ``` diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f293c804d6f9e9a83ca4c5.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f293c804d6f9e9a83ca4c5.md index 939540134a4..cf0afbcbf4c 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f293c804d6f9e9a83ca4c5.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f293c804d6f9e9a83ca4c5.md @@ -18,7 +18,7 @@ Open the console, and make a selection from the teammates dropdown menu. You sho You should add a `console.log` with the value of `e.target.value`. ```js -assert.match(code, /console.log\s*\(e.target.value\)\s*/) +assert.match(code, /console\.log\s*\(e\.target\.value\)\s*/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29804e3ec00ea6fab1ec4.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29804e3ec00ea6fab1ec4.md index 8e3151008fe..009781b8497 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29804e3ec00ea6fab1ec4.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-modern-javascript-methods-by-building-football-team-cards/63f29804e3ec00ea6fab1ec4.md @@ -18,7 +18,7 @@ Inside the callback function, access the `innerHTML` property of the `playerCard You should not have the `console.log` statement in your code. ```js -assert.notMatch(code, /\s*console.log\(e.target.value\)/); +assert.notMatch(code, /\s*console\.log\(e\.target\.value\)/); ``` You should access the `innerHTML` property of the `playerCards` element. @@ -30,7 +30,7 @@ assert.match(code, /playerCards\.innerHTML\s*=/); You should set the `innerHTML` property to an empty string. ```js -assert.match(code, /\s*playerCards.innerHTML\s*=\s*('|"|`)\1/) +assert.match(code, /\s*playerCards\.innerHTML\s*=\s*('|"|`)\1/) ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-recursion-by-building-a-decimal-to-binary-converter/63e9eb5b2328eed3d194b28a.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-recursion-by-building-a-decimal-to-binary-converter/63e9eb5b2328eed3d194b28a.md index 95616eafc18..577630faf91 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-recursion-by-building-a-decimal-to-binary-converter/63e9eb5b2328eed3d194b28a.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-recursion-by-building-a-decimal-to-binary-converter/63e9eb5b2328eed3d194b28a.md @@ -26,13 +26,13 @@ assert.notMatch(code, /('|"|`)keydown\1\s*,\s*(\(\s*e\s*\)|e)\s*=>\s*{\s*.*conso Your `if` statement should check if `e.key` is equal to the string `Enter`. ```js -assert.match(code, /if\s*\(\s*(?:e\s*\.\s*key\s*===?\s*('|"|`)Enter\1|('|"|`)Enter\2\s*===?\s*e\s*.key)\s*\)\s*\{/); +assert.match(code, /if\s*\(\s*(?:e\s*\.\s*key\s*===?\s*('|"|`)Enter\1|('|"|`)Enter\2\s*===?\s*e\s*\.key)\s*\)\s*\{/); ``` The body of your `if` statement should be empty. ```js -assert.match(code, /if\s*\(\s*(?:e\s*\.\s*key\s*===?\s*('|"|`)Enter\1|('|"|`)Enter\2\s*===?\s*e\s*.key)\s*\)\s*\{\s*\}/); +assert.match(code, /if\s*\(\s*(?:e\s*\.\s*key\s*===?\s*('|"|`)Enter\1|('|"|`)Enter\2\s*===?\s*e\s*\.key)\s*\)\s*\{\s*\}/); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388ac7154e44b72c74d616.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388ac7154e44b72c74d616.md index 9fb64bf6f3a..3ea8c49afc6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388ac7154e44b72c74d616.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388ac7154e44b72c74d616.md @@ -16,7 +16,7 @@ Also, make sure to remove your `console.log(formattedDate);` line. You should use the `textContent` property to set the text content of `currentDateParagraph` to the value of the constant `formattedDate`. ```js -assert(code.match(/currentDateParagraph.textContent\s*=\s*formattedDate/g)); +assert(code.match(/currentDateParagraph\.textContent\s*=\s*formattedDate/g)); ``` You should not have a `console.log(formattedDate);` line in your code. diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388bbcbf6928b83fc424d1.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388bbcbf6928b83fc424d1.md index 2eada1d7304..3a97d9815ab 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388bbcbf6928b83fc424d1.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388bbcbf6928b83fc424d1.md @@ -22,13 +22,13 @@ Chain the `addEventListener` method to `dateOptionsSelectElement` where the firs You should use the `addEventListener` method to add a `change` event listener to `dateOptionsSelectElement`. ```js -assert(code.match(/dateOptionsSelectElement.addEventListener\s*\(\s*('|")change\1/g)); +assert(code.match(/dateOptionsSelectElement\.addEventListener\s*\(\s*('|")change\1/g)); ``` You should add an empty arrow function as the second argument to the `addEventListener` method. ```js -assert(code.match(/dateOptionsSelectElement.addEventListener\s*\(\s*('|")change\1\s*,\s*\(\s*\)\s*=>\s*{\s*}/g)); +assert(code.match(/dateOptionsSelectElement\.addEventListener\s*\(\s*('|")change\1\s*,\s*\(\s*\)\s*=>\s*{\s*}/g)); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388d61a57a00b9ad0d0817.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388d61a57a00b9ad0d0817.md index e4a9252cddf..485673a4bc2 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388d61a57a00b9ad0d0817.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388d61a57a00b9ad0d0817.md @@ -34,7 +34,7 @@ Create a `switch` statement and use `dateOptionsSelectElement.value` as the expr You should use a `switch` statement where `dateOptionsSelectElement.value` is the expression. ```js -assert(code.match(/switch\s*\(\s*dateOptionsSelectElement.value\s*\)/g)); +assert(code.match(/switch\s*\(\s*dateOptionsSelectElement\.value\s*\)/g)); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388edfdf364fbb04e426f2.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388edfdf364fbb04e426f2.md index a788da28b1c..ea7c57f915e 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388edfdf364fbb04e426f2.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65388edfdf364fbb04e426f2.md @@ -26,7 +26,7 @@ Add a `case` where the value is `yyyy-mm-dd`. Inside the `case`, set the text co You should add a `case` where the condition is `yyyy-mm-dd`. Then set the `textContent` property of `currentDateParagraph` equal to `formattedDate`. ```js -assert(code.match(/case\s*('|")yyyy-mm-dd\1\s*:\s*currentDateParagraph.textContent\s*=\s*formattedDate/g)); +assert(code.match(/case\s*('|")yyyy-mm-dd\1\s*:\s*currentDateParagraph\.textContent\s*=\s*formattedDate/g)); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65389a63d3b1d6c764c0e10e.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65389a63d3b1d6c764c0e10e.md index 80b01f32c16..bd118c96585 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65389a63d3b1d6c764c0e10e.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65389a63d3b1d6c764c0e10e.md @@ -16,13 +16,13 @@ Also, make sure to include a `break` statement to terminate the `switch` stateme You should add a `case` where the condition is `mm-dd-yyyy-h-mm`, then set the `textContent` property of `currentDateParagraph` equal to empty template literals. ```js -assert(code.match(/case\s*('|")mm-dd-yyyy-h-mm\1\s*:\s*currentDateParagraph.textContent\s*=\s*``/g)); +assert(code.match(/case\s*('|")mm-dd-yyyy-h-mm\1\s*:\s*currentDateParagraph\.textContent\s*=\s*``/g)); ``` You should include a `break` statement within the `case` after your logic. ```js -assert(code.match(/currentDateParagraph.textContent\s*=\s*``\;?\n+\s*break/g)); +assert(code.match(/currentDateParagraph\.textContent\s*=\s*``\;?\n+\s*break/g)); ``` # --seed-- diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65389eff4893facbbe6eae67.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65389eff4893facbbe6eae67.md index 7d1c058e5d4..350cb14ac90 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65389eff4893facbbe6eae67.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-the-date-object-by-building-a-date-formatter/65389eff4893facbbe6eae67.md @@ -34,7 +34,7 @@ And with that, your date formatter is complete! You can now format the current d You should use the `default` case to set the `textContent` property of `currentDateParagraph` to the value of `formattedDate`. ```js -assert(code.match(/default\s*:\s*currentDateParagraph.textContent\s*=\s*formattedDate/g)); +assert(code.match(/default\s*:\s*currentDateParagraph\.textContent\s*=\s*formattedDate/g)); ``` # --seed--