From d50a0712ddc237a1f43e259f4b00bfda3bc4e643 Mon Sep 17 00:00:00 2001 From: Supravisor <153783117+Supravisor@users.noreply.github.com> Date: Mon, 19 Aug 2024 19:14:55 +1200 Subject: [PATCH] chore(curriculum): fCC Forum Leaderboard add quotes to strings (#55699) Co-authored-by: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> --- .../643e9f727a93d80198228d57.md | 4 ++-- .../6443c98ac169e501eba36d04.md | 6 +++--- .../64440a50d076c204051f2cc0.md | 6 +++--- .../644f360e888420013dbe705f.md | 8 ++++---- .../644fba64caf60303c9540d14.md | 4 ++-- .../646474a88d0d4a016f895ba8.md | 4 ++-- .../64649b108df035051cb2ba2d.md | 4 ++-- .../657386f11fb8265660bfac75.md | 8 ++++---- .../65738cc6cba1825b14806b3d.md | 8 ++++---- .../65760954561c726e832a0cc8.md | 6 +++--- .../65760ce115eb06716baeb361.md | 8 ++++---- .../65760de70283687288fe70cf.md | 8 ++++---- 12 files changed, 37 insertions(+), 37 deletions(-) diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/643e9f727a93d80198228d57.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/643e9f727a93d80198228d57.md index 859afd29bf9..919422ce484 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/643e9f727a93d80198228d57.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/643e9f727a93d80198228d57.md @@ -9,7 +9,7 @@ dashedName: step-19 To display the topic title, add a `p` element inside the first `td` element. -Between the paragraph tags, add an embedded expression that contains the `title` variable. Then add a class called `post-title` inside the opening paragraph tag. +Between the paragraph tags, add an embedded expression that contains the `title` variable. Then add a class called `"post-title"` inside the opening paragraph tag. # --hints-- @@ -19,7 +19,7 @@ You should have a `p` element inside the first `td` element. assert(/return\s*`\s*\s*\s*\S*\s*\s*.*\s*<\/p>\s*\S*\s*<\/td>\s*.*<\/td>\s*\s*\S*\s*<\/td>\s*.*<\/td>\s*.*<\/td>\s*<\/tr>\s*`/.test(code)); ``` -You should have a class named `post-title` inside the opening `p` tag. +You should have a class named `"post-title"` inside the opening `p` tag. ```js assert(/return\s*`\s*\s*\s*\S*\s*]*class\s*=\s*('|")\s*post-title\s*\1[^>]*>.*<\/p>\s*\S*\s*<\/td>\s*.*<\/td>\s*\s*\S*\s*<\/td>\s*.*<\/td>\s*.*<\/td>\s*<\/tr>\s*`/.test(code)); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/6443c98ac169e501eba36d04.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/6443c98ac169e501eba36d04.md index 1cd7733c4ca..94fe852d914 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/6443c98ac169e501eba36d04.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/6443c98ac169e501eba36d04.md @@ -11,9 +11,9 @@ For your `timeAgo` function, you will want to calculate the difference between t Complete the `timeAgo` function that meets the following requirements: -- If the amount of minutes that have passed is less than `60`, return the string `xm ago`. `x` will represent the minutes. -- If the amount of hours that have passed is less than `24`, return the string `xh ago`. `x` will represent the hours. -- Otherwise, return the string `xd ago`. `x` will represent the days. +- If the amount of minutes that have passed is less than `60`, return the string `"xm ago"`. `x` will represent the minutes. +- If the amount of hours that have passed is less than `24`, return the string `"xh ago"`. `x` will represent the hours. +- Otherwise, return the string `"xd ago"`. `x` will represent the days. Here are some equations that will help you calculate the time difference: diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/64440a50d076c204051f2cc0.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/64440a50d076c204051f2cc0.md index 0dd6b849e77..2bcd0bdd8b0 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/64440a50d076c204051f2cc0.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/64440a50d076c204051f2cc0.md @@ -13,7 +13,7 @@ Create a `viewCount` function with a `views` parameter. If `views` is greater th Otherwise, return the `views` value. -For example, if `views` is `1000` your return value should be the string `1k`. +For example, if `views` is `1000` your return value should be the string `"1k"`. # --hints-- @@ -29,13 +29,13 @@ Your `viewCount` function should have a parameter called `views`. assert.match(viewCount.toString(), /\(?views\)?/); ``` -Your `viewCount` function should return the string `1k` when `views` is `1000`. +Your `viewCount` function should return the string `"1k"` when `views` is `1000`. ```js assert.strictEqual(viewCount(1000), "1k"); ``` -Your `viewCount` function should return the string `100k` when `views` is `100000`. +Your `viewCount` function should return the string `"100k"` when `views` is `100000`. ```js assert.strictEqual(viewCount(100000), "100k"); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/644f360e888420013dbe705f.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/644f360e888420013dbe705f.md index e6221db3ac6..2ab67b39cba 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/644f360e888420013dbe705f.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/644f360e888420013dbe705f.md @@ -7,21 +7,21 @@ dashedName: step-37 # --description-- -Inside your `else` clause, assign the string `general` to `selectedCategory.className`. +Inside your `else` clause, assign the string `"general"` to `selectedCategory.className`. -Below that, assign the string `General` to `selectedCategory.category`. +Below that, assign the string `"General"` to `selectedCategory.category`. Lastly, assign the number `1` to `selectedCategory.id`. # --hints-- -You should assign the string `general` to `selectedCategory.className`. +You should assign the string `"general"` to `selectedCategory.className`. ```js assert.match(code, /selectedCategory\.className\s*=\s*('|"|`)general\1/); ``` -You should assign the string `General` to `selectedCategory.category`. +You should assign the string `"General"` to `selectedCategory.category`. ```js assert.match(code, /selectedCategory\.category\s*=\s*('|"|`)General\1/); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/644fba64caf60303c9540d14.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/644fba64caf60303c9540d14.md index 6e5d952cfd9..e664c02f885 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/644fba64caf60303c9540d14.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/644fba64caf60303c9540d14.md @@ -9,7 +9,7 @@ dashedName: step-42 After the `href` attribute, set the `class` attribute to the constant named `linkClass`. -After the `class` attribute, set the `target` attribute to `_blank`. +After the `class` attribute, set the `target` attribute to `"_blank"`. Lastly, place the `linkText` constant in between the anchor tags to display the text in the link. @@ -36,7 +36,7 @@ const anchorTagWithHrefClassAndTarget = /return\s+`]*href\s*=\s*('|")[^'"]* assert(code.match(anchorTagWithHrefClassAndTarget)); ``` -You should set the value of the `target` attribute to `_blank`. +You should set the value of the `target` attribute to `"_blank"`. ```js const targetValue = /return\s+`]*target\s*=\s*('|")_blank\1[^>]*>/g; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/646474a88d0d4a016f895ba8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/646474a88d0d4a016f895ba8.md index 6cd0e06863a..889911a0cfe 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/646474a88d0d4a016f895ba8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/646474a88d0d4a016f895ba8.md @@ -9,7 +9,7 @@ dashedName: step-52 For the remaining steps, you will add the functionality to display the user avatars. -Inside the second `td` element, add a `div` element with a class name of `avatar-container`. +Inside the second `td` element, add a `div` element with a class name of `"avatar-container"`. # --hints-- @@ -21,7 +21,7 @@ const divTest = /]*>([\s\S]*?)<\/div>/gm; assert.match(secondTd?.split(/<\/td>/)?.[0], divTest); ``` -Your opening `div` tag should have a class attribute with the value of `avatar-container`. +Your opening `div` tag should have a class attribute with the value of `"avatar-container"`. ```js const secondTd = code.split(/postsContainer\.innerHTML = topics\.map/)?.[1]?.split(/\s*<\/td>\s*/)?.[1]; diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/64649b108df035051cb2ba2d.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/64649b108df035051cb2ba2d.md index 101ab134709..9ac1cdf08bf 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/64649b108df035051cb2ba2d.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/64649b108df035051cb2ba2d.md @@ -7,13 +7,13 @@ dashedName: step-55 # --description-- -For the opening `a` tag, set the `target` attribute to `_blank`. Then, set the `href` attribute to `${forumTopicUrl}${slug}/${id}`. +For the opening `a` tag, set the `target` attribute to `"_blank"`. Then, set the `href` attribute to `${forumTopicUrl}${slug}/${id}`. And with those changes, your freeCodeCamp forum leaderboard project is now complete! # --hints-- -Your opening anchor tag should have a `target` attribute set to `_blank`. +Your opening anchor tag should have a `target` attribute set to `"_blank"`. ```js const firstTd = code.split(/postsContainer\.innerHTML = topics\.map/)?.[1]?.split(/\s*\s*/)?.[1]; 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 440217411e2..8f39faf1e09 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 @@ -10,9 +10,9 @@ demoType: onLoad In this project, you will build a freeCodeCamp forum leaderboard that displays the latest topics, users, and replies from the [freeCodeCamp forum](https://forum.freecodecamp.org/). The HTML and CSS have been provided for you. Feel free to explore them. -When you are ready, use `const` to declare a `forumLatest` variable and assign it the string `https://cdn.freecodecamp.org/curriculum/forum-latest/latest.json`. +When you are ready, use `const` to declare a `forumLatest` variable and assign it the string `"https://cdn.freecodecamp.org/curriculum/forum-latest/latest.json"`. -Below that, create another `const` variable called `forumTopicUrl` and assign it the string `https://forum.freecodecamp.org/t/`. +Below that, create another `const` variable called `forumTopicUrl` and assign it the string `"https://forum.freecodecamp.org/t/"`. # --hints-- @@ -22,7 +22,7 @@ You should declare a `forumLatest` variable with `const`. assert.match(code, /const\s+forumLatest\s*=/); ``` -You should assign `https://cdn.freecodecamp.org/curriculum/forum-latest/latest.json` to your `forumLatest` variable. +You should assign `"https://cdn.freecodecamp.org/curriculum/forum-latest/latest.json"` to your `forumLatest` variable. ```js assert.match(code, /const\s+forumLatest\s*=\s*('|")https:\/\/cdn\.freecodecamp\.org\/curriculum\/forum-latest\/latest\.json\1\s*/); @@ -34,7 +34,7 @@ You should declare a `forumTopicUrl` variable with `const`. assert.match(code, /const\s+forumTopicUrl\s*=/); ``` -You should assign `https://forum.freecodecamp.org/t/` to your `forumTopicUrl` variable. +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*/); 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 e472d9908ec..32b31864994 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 @@ -7,9 +7,9 @@ dashedName: step-2 # --description-- -Next, create a `const` variable called `forumCategoryUrl` and assign it the string `https://forum.freecodecamp.org/c/`. +Next, create a `const` variable called `forumCategoryUrl` and assign it the string `"https://forum.freecodecamp.org/c/"`. -Below that, create another `const` variable called `avatarUrl` and assign it the string `https://sea1.discourse-cdn.com/freecodecamp`. +Below that, create another `const` variable called `avatarUrl` and assign it the string `"https://sea1.discourse-cdn.com/freecodecamp"`. # --hints-- @@ -19,7 +19,7 @@ You should declare a `forumCategoryUrl` variable with `const`. assert.match(code, /const\s+forumCategoryUrl\s*=/); ``` -You should assign `https://forum.freecodecamp.org/c/` to your `forumCategoryUrl` variable. +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*/); @@ -31,7 +31,7 @@ You should declare an `avatarUrl` variable with `const`. assert.match(code, /const\s+avatarUrl\s*=/); ``` -You should assign `https://sea1.discourse-cdn.com/freecodecamp` to your `avatarUrl` variable. +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*/); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65760954561c726e832a0cc8.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65760954561c726e832a0cc8.md index c1b58274d42..2e1d91cb667 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65760954561c726e832a0cc8.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65760954561c726e832a0cc8.md @@ -9,7 +9,7 @@ dashedName: step-28 Inside your `allCategories` object, add a new key for the number `299` with a value of an empty object. -Inside that object, add a property with a key of `category` and a string value of `Career Advice`. Below that property, add another key called `className` with a string value of `career`. +Inside that object, add a property with a key of `category` and a string value of `"Career Advice"`. Below that property, add another key called `className` with a string value of `"career"`. # --hints-- @@ -31,7 +31,7 @@ Your `299` object should have a `category` property. assert.property(allCategories['299'], 'category'); ``` -Your `category` property should be set to the string `Career Advice`. +Your `category` property should be set to the string `"Career Advice"`. ```js assert.equal(allCategories["299"].category, 'Career Advice'); @@ -43,7 +43,7 @@ Your `299` object should have a `className` property. assert.property(allCategories['299'], 'className'); ``` -Your `className` property should be set to the string `career`. +Your `className` property should be set to the string `"career"`. ```js assert.equal(allCategories["299"].className, 'career'); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65760ce115eb06716baeb361.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65760ce115eb06716baeb361.md index 545ccffc3aa..aeacd716bb6 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65760ce115eb06716baeb361.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65760ce115eb06716baeb361.md @@ -9,9 +9,9 @@ dashedName: step-29 Add a new key for the number `409` with a value of an empty object. -Inside that object, add a property with a key of `category` and a string value of `Project Feedback`. +Inside that object, add a property with a key of `category` and a string value of `"Project Feedback"`. -Below that property, add another key called `className` with a string value of `feedback`. +Below that property, add another key called `className` with a string value of `"feedback"`. # --hints-- @@ -33,7 +33,7 @@ Your `409` object should have a `category` property. assert.property(allCategories['409'], 'category'); ``` -Your `category` property should be set to the string `Project Feedback`. +Your `category` property should be set to the string `"Project Feedback"`. ```js assert.equal(allCategories["409"].category, 'Project Feedback'); @@ -45,7 +45,7 @@ Your `409` object should have a `className` property. assert.property(allCategories['409'], 'className'); ``` -Your `className` property should be set to the string `feedback`. +Your `className` property should be set to the string `"feedback"`. ```js assert.equal(allCategories["409"].className, 'feedback'); diff --git a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65760de70283687288fe70cf.md b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65760de70283687288fe70cf.md index e9aea0061ad..7cd06615afc 100644 --- a/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65760de70283687288fe70cf.md +++ b/curriculum/challenges/english/15-javascript-algorithms-and-data-structures-22/learn-asynchronous-programming-by-building-an-fcc-forum-leaderboard/65760de70283687288fe70cf.md @@ -9,9 +9,9 @@ dashedName: step-30 Add a new key for the number `417` with a value of an empty object. -Inside that object, add a property with a key of `category` and a string value of `freeCodeCamp Support`. +Inside that object, add a property with a key of `category` and a string value of `"freeCodeCamp Support"`. -Below that property, add another key called `className` with a string value of `support`. +Below that property, add another key called `className` with a string value of `"support"`. # --hints-- @@ -33,7 +33,7 @@ Your `417` object should have a `category` property. assert.property(allCategories['417'], 'category'); ``` -Your `category` property should be set to the string `freeCodeCamp Support`. +Your `category` property should be set to the string `"freeCodeCamp Support"`. ```js assert.equal(allCategories["417"].category, 'freeCodeCamp Support'); @@ -45,7 +45,7 @@ Your `417` object should have a `className` property. assert.property(allCategories['417'], 'className'); ``` -Your `className` property should be set to the string `support`. +Your `className` property should be set to the string `"support"`. ```js assert.equal(allCategories["417"].className, 'support');