Skip to content
This repository was archived by the owner on Feb 25, 2026. It is now read-only.
This repository was archived by the owner on Feb 25, 2026. It is now read-only.

testing out a diff format #62

@RandellDawson

Description

@RandellDawson
Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,4 @@
 <section id="description">
 <p>Given a positive integer <code>num</code>, return the sum of all odd Fibonacci numbers that are less than or equal to <code>num</code>.</p>
 <p>The first two numbers in the Fibonacci sequence are 1 and 1. Every additional number in the sequence is the sum of the two previous numbers. The first six numbers of the Fibonacci sequence are 1, 1, 2, 3, 5 and 8.</p>
-<p>For example, <code>sumFibs(10)</code> should return <code>10</code> because all odd Fibonacci numbers less than or equal to <code>10</code> are 1, 1, 3, and 5.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>For example, <code>sumFibs(10)</code> should return <code>10</code> because all odd Fibonacci numbers less than or equal to <code>10</code> are 1, 1, 3, and 5.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,2 @@
 <section id="description">
-<p>You will be provided with an initial array (the first argument in the destroyer function), followed by one or more arguments. Remove all elements from the initial array that are of the same value as these arguments.</p><p><strong>Note</strong><br> You have to use the <code>arguments</code> object.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>You will be provided with an initial array (the first argument in the destroyer function), followed by one or more arguments. Remove all elements from the initial array that are of the same value as these arguments.</p><p><strong>Note</strong><br> You have to use the <code>arguments</code> object.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -4,5 +4,4 @@ itself. For example, 2 is a prime number because it is only divisible by 1 and 2
 contrast, 4 is not prime since it is divisible by 1, 2 and 4.</p>
 <p>Rewrite <code>sumPrimes</code> so it returns the sum of all prime numbers that are less than or
 equal to num.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p>
 </section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -2,5 +2,4 @@
 <p>Check if the predicate (second argument) is <dfn>truthy</dfn> on all elements of a collection (first argument).</p>
 <p>In other words, you are given an array collection of objects. The predicate <code>pre</code> will be an object property and you need to return <code>true</code> if its value is <code>truthy</code>. Otherwise, return <code>false</code>.</p>
 <p>In JavaScript, <code>truthy</code> values are values that translate to <code>true</code> when evaluated in a Boolean context.</p>
-<p>Remember, you can access object properties through either dot notation or <code>[]</code> notation.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>Remember, you can access object properties through either dot notation or <code>[]</code> notation.</p></section>
\ No newline at end of file
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 4
    Version Text
    Old
      <code>truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true}, {"name": "FastFoward", "onBoat": null}], "onBoat")</code> should return false
    
    New
      `truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true}, {"name": "FastForward", "onBoat": null}], "onBoat")` should return false
    
    

    Test 5

    Version Text
    Old
      <code>truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true, "alias": "Repete"}, {"name": "FastFoward", "onBoat": true}], "onBoat")</code> should return true
    
    New
      `truthCheck([{"name": "Pete", "onBoat": true}, {"name": "Repeat", "onBoat": true, "alias": "Repete"}, {"name": "FastForward", "onBoat": true}], "onBoat")` should return true
    
    

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,4 @@
 <section id="description">
 <p>Find the smallest common multiple of the provided parameters that can be evenly divided by both, as well as by all sequential numbers in the range between these parameters.</p>
 <p>The range will be an array of two numbers that will not necessarily be in numerical order.</p>
-<p>For example, if given 1 and 3, find the smallest common multiple of both 1 and 3 that is also evenly divisible by all numbers <em>between</em> 1 and 3. The answer here would be 6.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>For example, if given 1 and 3, find the smallest common multiple of both 1 and 3 that is also evenly divisible by all numbers <em>between</em> 1 and 3. The answer here would be 6.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,2 @@
 <section id="description">
-<p>Convert the characters <code>&#x26;</code>, <code>&#x3C;</code>, <code>></code>, <code>"</code> (double quote), and <code>'</code> (apostrophe), in a string to their corresponding HTML entities.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>Convert the characters <code>&#x26;</code>, <code>&#x3C;</code>, <code>></code>, <code>"</code> (double quote), and <code>'</code> (apostrophe), in a string to their corresponding HTML entities.</p></section>
\ No newline at end of file
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 1
    Version Text
    Old
      <code>convertHTML("Dolce & Gabbana")</code> should return <code>Dolce &amp;amp; Gabbana</code>.
    
    New
      `convertHTML("Dolce & Gabbana")` should return `"Dolce &amp; Gabbana"`.
    
    

    Test 2

    Version Text
    Old
      <code>convertHTML("Hamburgers < Pizza < Tacos")</code> should return <code>Hamburgers &amp;lt; Pizza &amp;lt; Tacos</code>.
    
    New
      `convertHTML("Hamburgers < Pizza < Tacos")` should return `"Hamburgers &lt; Pizza &lt; Tacos"`.
    
    

    Test 3

    Version Text
    Old
      <code>convertHTML("Sixty > twelve")</code> should return <code>Sixty &amp;gt; twelve</code>.
    
    New
      `convertHTML("Sixty > twelve")` should return `"Sixty &gt; twelve"`.
    
    

    Test 4

    Version Text
    Old
      <code>convertHTML(&apos;Stuff in "quotation marks"&apos;)</code> should return <code>Stuff in &amp;quot;quotation marks&amp;quot;</code>.
    
    New
      `convertHTML('Stuff in "quotation marks"')` should return `"Stuff in &quot;quotation marks&quot;"`.
    
    

    Test 5

    Version Text
    Old
      <code>convertHTML("Schindler&apos;s List")</code> should return <code>Schindler&amp;apos;s List</code>.
    
    New
      `convertHTML("Schindler's List")` should return `"Schindler&apos;s List"`.
    
    

    Test 6

    Version Text
    Old
      <code>convertHTML("<>")</code> should return <code>&amp;lt;&amp;gt;</code>.
    
    New
      `convertHTML("<>")` should return `"&lt;&gt;"`.
    
    

    Test 7

    Version Text
    Old
      <code>convertHTML("abc")</code> should return <code>abc</code>.
    
    New
      `convertHTML("abc")` should return `"abc"`.
    
    

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,2 @@
 <section id="description">
-<p>Flatten a nested array. You must account for varying levels of nesting.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>Flatten a nested array. You must account for varying levels of nesting.</p></section>
\ No newline at end of file
  • Number of tests do not match - English: 5 | Chinese: 4
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -2,5 +2,4 @@
 <p>Perform a search and replace on the sentence using the arguments provided and return the new sentence.</p>
 <p>First argument is the sentence to perform the search and replace on.</p>
 <p>Second argument is the word that you will be replacing (before).</p>
-<p>Third argument is what you will be replacing the second argument with (after).</p><p><strong>Note</strong><br> Preserve the case of the first character in the original word when you are replacing it. For example if you mean to replace the word "Book" with the word "dog", it should be replaced as "Dog"</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>Third argument is what you will be replacing the second argument with (after).</p><p><strong>Note</strong><br> Preserve the case of the first character in the original word when you are replacing it. For example if you mean to replace the word "Book" with the word "dog", it should be replaced as "Dog"</p></section>
\ No newline at end of file
  • Number of tests do not match - English: 6 | Chinese: 5
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -2,5 +2,4 @@
 <p>Write a function that takes two or more arrays and returns a new array of unique values in the order of the original provided arrays.</p>
 <p>In other words, all values present from all arrays should be included in their original order, but with no duplicates in the final array.</p>
 <p>The unique numbers should be sorted by their original order, but the final array should not be sorted in numerical order.</p>
-<p>Check the assertion tests for examples.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>Check the assertion tests for examples.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,3 @@
 <section id="description">
 <p>Given the array <code>arr</code>, iterate through and remove each element starting from the first element (the 0 index) until the function <code>func</code> returns <code>true</code> when the iterated element is passed through it.</p>
-<p>Then return the rest of the array once the condition is satisfied, otherwise, <code>arr</code> should be returned as an empty array.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>Then return the rest of the array once the condition is satisfied, otherwise, <code>arr</code> should be returned as an empty array.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -3,5 +3,4 @@
 <p>For example, <code>addTogether(2, 3)</code> should return <code>5</code>, and <code>addTogether(2)</code> should return a function.</p>
 <p>Calling this returned function with a single argument will then return the sum:</p><p><code>var sumTwoAnd = addTogether(2);</code></p>
 <p><code>sumTwoAnd(3)</code> returns <code>5</code>.</p>
-<p>If either argument isn't a valid number, return undefined.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>If either argument isn't a valid number, return undefined.</p></section>
\ No newline at end of file
  • Number of tests do not match - English: 6 | Chinese: 5
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,3 @@
 <section id="description">
 <p>Return an English translated sentence of the passed binary string.</p>
-<p>The binary string will be space separated.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>The binary string will be space separated.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,6 +1,4 @@
 <section id="description">
-<p>Translate the provided string to pig latin.</p><p><a href="http://en.wikipedia.org/wiki/Pig_Latin" target="_blank">Pig Latin</a> takes the first consonant (or consonant cluster) of an English word, moves it to the end of the word and suffixes an "ay".</p>
-<p>If a word begins with a vowel you just add "way" to the end.</p>
-<p>If a word does not contain a vowel, just add "ay" to the end.</p>
-<p>Input strings are guaranteed to be English words in all lowercase.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>Pig Latin is a way of altering English Words. The rules are as follows:</p>
+<p>- If a word begins with a consonant, take the first consonant or consonant cluster, move it to the end of the word, and add "ay" to it.</p>
+<p>- If a word begins with a vowel, just add "way" at the end.</p></section>
\ No newline at end of file
  • Instructions section has changed
@@ -0,0 +1,2 @@
+<section id="instructions">
+<p>Translate the provided string to Pig Latin. Input strings are guaranteed to be English words in all lowercase.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,2 @@
 <section id="description">
-<p>Compare two arrays and return a new array with any items only found in one of the two given arrays, but not both. In other words, return the symmetric difference of the two arrays.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p><p><strong>Note</strong><br>You can return the array with its elements in any order.</p></section>
\ No newline at end of file
+<p>Compare two arrays and return a new array with any items only found in one of the two given arrays, but not both. In other words, return the symmetric difference of the two arrays.</p><p><strong>Note</strong><br>You can return the array with its elements in any order.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,2 @@
 <section id="description">
-<p>Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>Convert a string to spinal case. Spinal case is all-lowercase-words-joined-by-dashes.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -3,5 +3,4 @@
 <p>The array will contain objects in the format <code>{name: 'name', avgAlt: avgAlt}</code>.</p>
 <p>You can read about orbital periods <a href="http://en.wikipedia.org/wiki/Orbital_period" target="_blank">on Wikipedia</a>.</p>
 <p>The values should be rounded to the nearest whole number. The body being orbited is Earth.</p>
-<p>The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418 km<sup>3</sup>s<sup>-2</sup>.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>The radius of the earth is 6367.4447 kilometers, and the GM value of earth is 398600.4418 km<sup>3</sup>s<sup>-2</sup>.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -2,5 +2,4 @@
 <p>The DNA strand is missing the pairing element. Take each character, get its pair, and return the results as a 2d array.</p><p><a href="http://en.wikipedia.org/wiki/Base_pair" target="_blank">Base pairs</a> are a pair of AT and CG. Match the missing element to the provided character.</p>
 <p>Return the provided character as the first element in each array.</p>
 <p>For example, for the input GCG, return [["G", "C"], ["C","G"],["G", "C"]]</p>
-<p>The character and its pair are paired up in an array, and all the arrays are grouped into one encapsulating array.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>The character and its pair are paired up in an array, and all the arrays are grouped into one encapsulating array.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,3 @@
 <section id="description">
 <p>Find the missing letter in the passed letter range and return it.</p>
-<p>If all letters are present in the range, return undefined.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>If all letters are present in the range, return undefined.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -8,6 +8,5 @@ setFullName(firstAndLast)
 </code></pre></p>
 <p>Run the tests to see the expected output for each method.
 The methods that take an argument must accept only one argument and it has to be a string.
-These methods must be the only available means of interacting with the object.
-Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p>
+These methods must be the only available means of interacting with the object.</p>
 </section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,3 @@
 <section id="description">
 <p>We'll pass you an array of two numbers. Return the sum of those two numbers plus the sum of all the numbers between them. The lowest number will not always come first.</p><p>For example, <code>sumAll([4,1])</code> should return <code>10</code> because sum of all the numbers between 1 and 4 (both inclusive) is <code>10</code>.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p>
 </section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,3 @@
 <section id="description">
 <p>Make a function that looks through an array of objects (first argument) and returns an array of all objects that have matching name and value pairs (second argument). Each name and value pair of the source object has to be present in the object from the collection if it is to be included in the returned array.</p>
-<p>For example, if the first argument is <code>[{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }]</code>, and the second argument is <code>{ last: "Capulet" }</code>, then you must return the third object from the array (the first argument), because it contains the name and its value, that was passed on as the second argument.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>For example, if the first argument is <code>[{ first: "Romeo", last: "Montague" }, { first: "Mercutio", last: null }, { first: "Tybalt", last: "Capulet" }]</code>, and the second argument is <code>{ last: "Capulet" }</code>, then you must return the third object from the array (the first argument), because it contains the name and its value, that was passed on as the second argument.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,10 +1,15 @@
 <section id="description">
 <p>So far, you have only been checking if a pattern exists or not within a string. You can also extract the actual matches you found with the <code>.match()</code> method.</p>
-<p>To use the <code>.match()</code> method, apply the method on a string and pass in the regex inside the parentheses. Here's an example:</p><p><pre><code class="language-js">"Hello, World!".match(/Hello/);
+<p>To use the <code>.match()</code> method, apply the method on a string and pass in the regex inside the parentheses. </p>
+<p>Here's an example:</p><p><pre><code class="language-js">"Hello, World!".match(/Hello/);
 // Returns ["Hello"]
 let ourStr = "Regular expressions";
 let ourRegex = /expressions/;
 ourStr.match(ourRegex);
 // Returns ["expressions"]
 </code></pre></p>
+<p>Note that the <code>.match</code> syntax is the "opposite" of the <code>.test</code> method you have been using thus far:</p>
+<p><pre><code class="language-js">'string'.match(/regex/);
+/regex/.test('string');
+</code></pre></p>
 </section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Number of tests do not match - English: 3 | Chinese: 1
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Write a regex so that it will search for the string <code>"good"</code>. Then update the <code>replaceText</code> variable to replace <code>"good"</code> with <code>"okey-dokey"</code>.</p></section>
\ No newline at end of file
+<p>Write a regex <code>fixRegex</code> using three capture groups that will search for each word in the string "one two three". Then update the <code>replaceText</code> variable to replace "one two three" with the string "three two one" and assign the result to the <code>result</code> variable. Make sure you are utilizing capture groups in the replacement string using the dollar sign (<code>$</code>) syntax.</p></section>
\ No newline at end of file
  • Number of tests do not match - English: 5 | Chinese: 3
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -2,7 +2,7 @@
 <p>Sometimes we want to check for groups of characters using a Regular Expression and to achieve that we use parentheses <code>()</code>.</p>
 <p>If you want to find either <code>Penguin</code> or <code>Pumpkin</code> in a string, you can use the following Regular Expression: <code>/P(engu|umpk)in/g</code></p>
 <p>Then check whether the desired string groups are in the test string by using the <code>test()</code> method.</p><p><pre><code class="language-js">let testStr = "Pumpkin";
-let testRegex = /P(engu|umpk)in/g;
+let testRegex = /P(engu|umpk)in/;
 testRegex.test(testStr);
 // Returns true
 </code></pre></p>
  • Number of tests do not match - English: 6 | Chinese: 5
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -2,6 +2,6 @@
 <p>Usernames are used everywhere on the internet. They are what give users a unique identity on their favorite sites.</p>
 <p>You need to check all the usernames in a database. Here are some simple rules that users have to follow when creating their username.</p>
 <p>1) Usernames can only use alpha-numeric characters.</p>
-<p>2) The only numbers in the username have to be at the end. There can be zero or more of them at the end.</p>
+<p>2) The only numbers in the username have to be at the end. There can be zero or more of them at the end. Username cannot start with the number.</p>
 <p>3) Username letters can be lowercase and uppercase.</p>
 <p>4) Usernames have to be at least two characters long. A two-character username can only use alphabet letters as characters.</p></section>
\ No newline at end of file
  • Number of tests do not match - English: 12 | Chinese: 11
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 2
    Version Text
    Old
      Your regex should use the shorthand character <code>\S/code> to match all non-whitespace characters.
    
    New
      Your regex should use the shorthand character `\S` to match all non-whitespace characters.
    
    

Show/Hide sections with changes/issues
  • Number of tests do not match - English: 9 | Chinese: 10
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Write a regex and use the appropriate string methods to remove whitespace at the beginning and end of strings.</p><p><strong>Note</strong><br>The <code>.trim()</code> method would work here, but you'll need to complete this challenge using regular expressions.</p></section>
\ No newline at end of file
+<p>Write a regex and use the appropriate string methods to remove whitespace at the beginning and end of strings.</p><p><strong>Note:</strong> The <code>String.prototype.trim()</code> method would work here, but you'll need to complete this challenge using regular expressions.</p></section>
\ No newline at end of file
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 2
    Version Text
    Old
      You should not use the <code>.trim()</code> method.
    
    New
      Your solution should not use the `String.prototype.trim()` method.
    
    

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,7 +1,8 @@
 <section id="description">
 <p>You may have noticed that some freeCodeCamp JavaScript challenges include their own console. This console behaves a little differently than the browser console you used in the last challenge.</p>
 <p>The following challenge is meant to highlight the main difference between the freeCodeCamp console and your browser console.</p>
-<p>When you run ordinary JavaScript, the browsers console will display your <code>console.log()</code> statements the exact number of times you requested.</p>
-<p>The freeCodeCamp console will print your <code>console.log()</code> statements for each test of that challenge, as well as one more time for any function calls that you have in your code.</p>
-<p>This lends itself to some interesting behavior and might trip you up in the beginning, because a logged value that you expect to see only once may print out many more times.</p>
-<p>If you would like to see only your single output and not have to worry about running through the test cycles, you can use <code>console.clear()</code> and check the browsers console.</p></section>
\ No newline at end of file
+<p>When you run ordinary JavaScript, the browser's console will display your <code>console.log()</code> statements the exact number of times it is called.</p>
+<p>The freeCodeCamp console will print your <code>console.log()</code> statements a short time after the editor detects a change in the script, as well as during testing.</p>
+<p>The freeCodeCamp console is cleared before the tests are run and, to avoid spam, only prints the logs during the first test (see the note below for exceptions).</p>
+<p>If you would like to see every log for every test, run the tests, and open the browser console. If you prefer to use the browser console, and want it to mimic the freeCodeCamp console, place <code>console.clear()</code> before any other <code>console</code> calls, to clear the browser console.</p><p><strong>Note:</strong> <code>console.log</code>s inside functions are printed to the freeCodeCamp console whenever those functions are called, this can help debugging functions that are called during testing.</p>
+</section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>First, use <code>console.clear()</code> to clear the browser console. After that, use <code>console.log</code> to log the <code>output</code> variable.</p></section>
\ No newline at end of file
+<p>First, use <code>console.log</code> to log the <code>output</code> variable. Then, use <code>console.clear</code> to clear the browser console.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -2,7 +2,7 @@
 <p>A for loop can also count backwards, so long as we can define the right conditions.</p>
 <p>In order to count backwards by twos, we'll need to change our <code>initialization</code>, <code>condition</code>, and <code>final-expression</code>.</p>
 <p>We'll start at <code>i = 10</code> and loop while <code>i > 0</code>. We'll decrement <code>i</code> by 2 each loop with <code>i -= 2</code>.</p><p><pre><code class="language-js">var ourArray = [];
-for (var i=10; i > 0; i-=2) {
+for (var i = 10; i > 0; i -= 2) {
   ourArray.push(i);
 }
 </code></pre></p>

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,6 +1,6 @@
 <section id="description">
 <p>The <dfn>conditional operator</dfn>, also called the <dfn>ternary operator</dfn>, can be used as a one line if-else expression.</p>
-<p>The syntax is:</p><p><code>condition ? statement-if-true : statement-if-false;</code></p>
+<p>The syntax is:</p><p><code>condition ? expression-if-true : expression-if-false;</code></p>
 <p>The following function uses an if-else statement to check a condition:</p><p><pre><code class="language-js">function findGreater(a, b) {
   if(a > b) {
     return "a is greater";

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,6 +1,6 @@
 <section id="description">
-<p>In computer science, <dfn>data</dfn> is anything that is meaningful to the computer. JavaScript provides seven different <dfn>data types</dfn> which are <code>undefined</code>, <code>null</code>, <code>boolean</code>, <code>string</code>, <code>symbol</code>, <code>number</code>, and <code>object</code>.</p>
-<p>For example, computers distinguish between numbers, such as the number <code>12</code>, and <code>strings</code>, such as <code>"12"</code>, <code>"dog"</code>, or <code>"123 cats"</code>, which are collections of characters. Computers can perform mathematical operations on a number, but not on a string.</p><p><dfn>Variables</dfn> allow computers to store and manipulate data in a dynamic fashion. They do this by using a "label" to point to the data rather than using the data itself. Any of the seven data types may be stored in a variable.</p><p><code>Variables</code> are similar to the x and y variables you use in mathematics, which means they're a simple name to represent the data we want to refer to. Computer <code>variables</code> differ from mathematical variables in that they can store different values at different times.</p>
+<p>In computer science, <dfn>data</dfn> is anything that is meaningful to the computer. JavaScript provides eight different <dfn>data types</dfn> which are <code>undefined</code>, <code>null</code>, <code>boolean</code>, <code>string</code>, <code>symbol</code>, <code>bigint</code>, <code>number</code>, and <code>object</code>.</p>
+<p>For example, computers distinguish between numbers, such as the number <code>12</code>, and <code>strings</code>, such as <code>"12"</code>, <code>"dog"</code>, or <code>"123 cats"</code>, which are collections of characters. Computers can perform mathematical operations on a number, but not on a string.</p><p><dfn>Variables</dfn> allow computers to store and manipulate data in a dynamic fashion. They do this by using a "label" to point to the data rather than using the data itself. Any of the eight data types may be stored in a variable.</p><p><code>Variables</code> are similar to the x and y variables you use in mathematics, which means they're a simple name to represent the data we want to refer to. Computer <code>variables</code> differ from mathematical variables in that they can store different values at different times.</p>
 <p>We tell JavaScript to create or <dfn>declare</dfn> a variable by putting the keyword <code>var</code> in front of it, like so:</p><p><pre><code class="language-js">var ourName;
 </code></pre></p>
 <p>creates a <code>variable</code> called <code>ourName</code>. In JavaScript we end statements with semicolons.
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Use the <code>var</code> keyword to create a variable called <code>myName</code>.</p><p><strong>Hint</strong><br>Look at the <code>ourName</code> example if you get stuck.</p></section>
\ No newline at end of file
+<p>Use the <code>var</code> keyword to create a variable called <code>myName</code>.</p><p><strong>Hint</strong><br>Look at the <code>ourName</code> example above if you get stuck.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,16 +1,3 @@
 <section id="description">
-<p>In a <a href="/learn/javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion">previous challenge</a>, you learned how to use recursion to replace a for loop. Now, let's look at a more complex function that returns an array of consecutive integers starting with <code>1</code> through the number passed to the function.</p>
-<p>As mentioned in the previous challenge, there will be a <dfn>base case</dfn>.  The base case tells the recursive function when it no longer needs to call itself.  It is a simple case where the return value is already known. There will also be a <dfn>recursive call</dfn> which executes the original function with different arguments. If the function is written correctly, eventually the base case will be reached.</p>
-<p>For example, say you want to write a recursive function that returns an array containing the numbers 1 through n.  This function will need to accept an argument <code>n</code> representing the final number. Then it will need to call itself with progressively smaller values of <code>n</code> until it reaches 1. You could write the function as follows:</p>
-<p><pre><code class="language-js">function count(n) {
-  if (n === 1) {
-    return [1];
-  } else {
-    var numbers = count(n - 1); 
-    numbers.push(n);
-    return numbers;
-  }
-}
-</code></pre></p>
-<p>At first this is counterintuitive since the value of <code>n</code> <em>decreases</em>, but the values in the final array are <em>increasing</em>.  This happens because the push happens last, after the recursive call has returned.  At the point where <code>n</code> is pushed into the array, <code>count(n - 1)</code> has already been evaluated and returned <code>[1, 2, ..., n - 1]</code>.</p>
+<p>Continuing from the previous challenge, we provide you another opportunity to create a recursive function to solve a problem.</p>
 </section>
\ No newline at end of file
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 6
    Version Text
    Old
      <code>rangeOfNumbers(4, 4)</code> should should return <code>[4]</code>.
    
    New
      `rangeOfNumbers(4, 4)` should return `[4]`.
    
    

Show/Hide sections with changes/issues
  • Description section has changed
@@ -3,4 +3,8 @@
 <p><pre><code class="language-js">'My name is Alan,' + ' I concatenate.'
 </code></pre></p>
 <p><strong>Note</strong><br>Watch out for spaces. Concatenation does not add spaces between concatenated strings, so you'll need to add them yourself.</p>
+<p>Example:</p>
+<p><pre><code class="language-js">var ourStr = "I come first. " + "I come second.";
+// ourStr is "I come first. I come second."
+</code></pre></p>
 </section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,5 @@
 <section id="description">
-<p>You may recall from <a href="learn/javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator" target="_blank">Comparison with the Equality Operator</a> that all comparison operators return a boolean <code>true</code> or <code>false</code> value.</p>
+<p>You may recall from <a href="/learn/javascript-algorithms-and-data-structures/basic-javascript/comparison-with-the-equality-operator" target="_blank">Comparison with the Equality Operator</a> that all comparison operators return a boolean <code>true</code> or <code>false</code> value.</p>
 <p>Sometimes people use an if/else statement to do a comparison, like this:</p><p><pre><code class="language-js">function isEqual(a,b) {
   if (a === b) {
     return true;

Show/Hide sections with changes/issues
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 1
    Version Text
    Old
      <code>"Kristian", "lastName"</code> should return <code>"Vos"</code>
    
    New
      `lookUpProfile("Kristian", "lastName")` should return `"Vos"`
    
    

    Test 2

    Version Text
    Old
      <code>"Sherlock", "likes"</code> should return <code>["Intriguing Cases", "Violin"]</code>
    
    New
      `lookUpProfile("Sherlock", "likes")` should return `["Intriguing Cases", "Violin"]`
    
    

    Test 3

    Version Text
    Old
      <code>"Harry","likes"</code> should return an array
    
    New
      `lookUpProfile("Harry", "likes")` should return an array
    
    

    Test 4

    Version Text
    Old
      <code>"Bob", "number"</code> should return "No such contact"
    
    New
      `lookUpProfile("Bob", "number")` should return "No such contact"
    
    

    Test 5

    Version Text
    Old
      <code>"Bob", "potato"</code> should return "No such contact"
    
    New
      `lookUpProfile("Bob", "potato")` should return "No such contact"
    
    

    Test 6

    Version Text
    Old
      <code>"Akira", "address"</code> should return "No such property"
    
    New
      `lookUpProfile("Akira", "address")` should return "No such property"
    
    

Show/Hide sections with changes/issues
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Use the <code>playerNumber</code> variable to look up player <code>16</code> in <code>testObj</code> using bracket notation. Then assign that name to the <code>player</code> variable.</p></section>
\ No newline at end of file
+<p>Set the <code>playerNumber</code> variable to <code>16</code>. Then, use the variable to look up the player's name and assign it to <code>player</code>.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 2
    Version Text
    Old
      You should be using <code>Math.random</code> to generate a random number.
    
    New
      You should use `Math.random` to generate a random number.
    
    

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,4 @@
 <section id="description">
 <p>Random numbers are useful for creating random behavior.</p>
 <p>JavaScript has a <code>Math.random()</code> function that generates a random decimal number between <code>0</code> (inclusive) and not quite up to <code>1</code> (exclusive). Thus <code>Math.random()</code> can return a <code>0</code> but never quite return a <code>1</code></p>
-<p><strong>Note</strong><br>Like <a href="learn/javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator" target="_blank">Storing Values with the Equal Operator</a>, all function calls will be resolved before the <code>return</code> executes, so we can <code>return</code> the value of the <code>Math.random()</code> function.</p></section>
\ No newline at end of file
+<p><strong>Note</strong><br>Like <a href="/learn/javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator" target="_blank">Storing Values with the Equal Operator</a>, all function calls will be resolved before the <code>return</code> executes, so we can <code>return</code> the value of the <code>Math.random()</code> function.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Write chained <code>if</code>/<code>else if</code> statements to fulfill the following conditions:</p><p><code>num &#x3C;   5</code> - return "Tiny"<br><code>num &#x3C;  10</code> - return "Small"<br><code>num &#x3C; 15</code> - return "Medium"<br><code>num &#x3C; 20</code> - return "Large"<br><code>num >= 20</code>  - return "Huge"</p></section>
\ No newline at end of file
+<p>Write chained <code>if</code>/<code>else if</code> statements to fulfill the following conditions:</p><p><code>num &#x3C; 5</code> - return "Tiny"<br><code>num &#x3C; 10</code> - return "Small"<br><code>num &#x3C; 15</code> - return "Medium"<br><code>num &#x3C; 20</code> - return "Large"<br><code>num >= 20</code>  - return "Huge"</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,5 @@
 <section id="description">
-<p>You can also nest arrays within other arrays, like this: <code>[["Bulls", 23], ["White Sox", 45]]</code>. This is also called a <dfn>multi-dimensional array<dfn>.
-</dfn></dfn></p></section>
\ No newline at end of file
+<p>You can also nest arrays within other arrays, like below:</p><p><pre><code class="language-js">[["Bulls", 23], ["White Sox", 45]]
+</code></pre></p>
+<p>This is also called a <dfn>multi-dimensional array<dfn>.</dfn></dfn></p>
+</section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,2 +1,8 @@
 <section id="description">
-<p>Not only can you <code>shift</code> elements off of the beginning of an array, you can also <code>unshift</code> elements to the beginning of an array i.e. add elements in front of the array.</p><p><code>.unshift()</code> works exactly like <code>.push()</code>, but instead of adding the element at the end of the array, <code>unshift()</code> adds the element at the beginning of the array.</p></section>
\ No newline at end of file
+<p>Not only can you <code>shift</code> elements off of the beginning of an array, you can also <code>unshift</code> elements to the beginning of an array i.e. add elements in front of the array.</p><p><code>.unshift()</code> works exactly like <code>.push()</code>, but instead of adding the element at the end of the array, <code>unshift()</code> adds the element at the beginning of the array.</p><p>Example:</p>
+<p><pre><code class="language-js">var ourArray = ["Stimpson", "J", "cat"];
+ourArray.shift(); // ourArray now equals ["J", "cat"]
+ourArray.unshift("Happy");
+// ourArray now equals ["Happy", "J", "cat"]
+</code></pre></p>
+</section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,8 +1,8 @@
 <section id="description">
-<p>In JavaScript, you can store a value in a variable with the <dfn>assignment</dfn> operator.</p><p><code>myVariable = 5;</code></p>
+<p>In JavaScript, you can store a value in a variable with the <dfn>assignment</dfn> operator (<code>=</code>). </p><p><code>myVariable = 5;</code></p>
 <p>This assigns the <code>Number</code> value <code>5</code> to <code>myVariable</code>.</p>
-<p>Assignment always goes from right to left. Everything to the right of the <code>=</code> operator is resolved before the value is assigned to the variable to the left of the operator.</p><p><pre><code class="language-js">myVar = 5;
-myNum = myVar;
+<p>If there are any calculations to the right of the <code>=</code> operator, those are performed before the value is assigned to the variable on the left of the operator.</p><p><pre><code class="language-js">var myVar;
+myVar = 5;
 </code></pre></p>
-<p>This assigns <code>5</code> to <code>myVar</code> and then resolves <code>myVar</code> to <code>5</code>  again and assigns it to <code>myNum</code>.</p>
+<p>First, this code creates a variable named <code>myVar</code>. Then, the code assigns <code>5</code> to <code>myVar</code>. Now, if <code>myVar</code> appears again in the code, the program will treat it as if it is <code>5</code>.</p>
 </section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,3 +1,2 @@
 <section id="instructions">
-<p>Assign the value <code>7</code> to variable <code>a</code>.</p>
-<p>Assign the contents of <code>a</code> to variable <code>b</code>.</p></section>
\ No newline at end of file
+<p>Assign the value <code>7</code> to variable <code>a</code>.</p></section>
\ No newline at end of file
  • Number of tests do not match - English: 2 | Chinese: 4
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,5 @@
 <section id="description">
-<p>Quotes are not the only characters that can be <dfn>escaped</dfn> inside a string. There are two reasons to use escaping characters:<ol><li>To allow you to use characters you may not otherwise be able to type out, such as a carriage returns.</li><li>To allow you to represent multiple quotes in a string without JavaScript misinterpreting what you mean.</li></ol>We learned this in the previous challenge.</p><p><table class="table table-striped"><thead><tr><th>Code</th><th>Output</th></tr></thead><tbody><tr><td><code>\'</code></td><td>single quote</td></tr><tr><td><code>\"</code></td><td>double quote</td></tr><tr><td><code>\</code></td><td>backslash</td></tr><tr><td><code>
+<p>Quotes are not the only characters that can be <dfn>escaped</dfn> inside a string. There are two reasons to use escaping characters:<ol><li>To allow you to use characters you may not otherwise be able to type out, such as a carriage return.</li><li>To allow you to represent multiple quotes in a string without JavaScript misinterpreting what you mean.</li></ol>We learned this in the previous challenge.</p><p><table class="table table-striped"><thead><tr><th>Code</th><th>Output</th></tr></thead><tbody><tr><td><code>\'</code></td><td>single quote</td></tr><tr><td><code>\"</code></td><td>double quote</td></tr><tr><td><code>\</code></td><td>backslash</td></tr><tr><td><code>
 </code></td><td>newline</td></tr><tr><td><code>
</code></td><td>carriage return</td></tr><tr><td><code>	</code></td><td>tab</td></tr><tr><td><code>�</code></td><td>word boundary</td></tr><tr><td><code></code></td><td>form feed</td></tr></tbody></table></p>
 <p><em>Note that the backslash itself must be escaped in order to display as a backslash.</em></p>
 </section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Instructions section has changed
@@ -1,3 +1,3 @@
 <section id="instructions">
-<p>Using <code>var</code>, declare a <code>global</code> variable <code>myGlobal</code> outside of any function. Initialize it with a value of <code>10</code>.</p>
+<p>Using <code>var</code>, declare a global variable named <code>myGlobal</code> outside of any function. Initialize it with a value of <code>10</code>.</p>
 <p>Inside function <code>fun1</code>, assign <code>5</code> to <code>oopsGlobal</code> <strong><em>without</em></strong> using the <code>var</code> keyword.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Instructions section has changed
@@ -1,3 +1,3 @@
 <section id="instructions">
 <p>Make an object that represents a dog called <code>myDog</code> which contains the properties <code>"name"</code> (a string), <code>"legs"</code>, <code>"tails"</code> and <code>"friends"</code>.</p>
-<p>You can set these object properties to whatever values you want, as long <code>"name"</code> is a string, <code>"legs"</code> and <code>"tails"</code> are numbers, and <code>"friends"</code> is an array.</p></section>
\ No newline at end of file
+<p>You can set these object properties to whatever values you want, as long as <code>"name"</code> is a string, <code>"legs"</code> and <code>"tails"</code> are numbers, and <code>"friends"</code> is an array.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,11 +1,12 @@
 <section id="description">
-<p>You are given a JSON object representing a part of your musical album collection. Each album has several properties and a unique id number as its key. Not all albums have complete information.</p>
-<p>Write a function which takes an album's <code>id</code> (like <code>2548</code>), a property <code>prop</code> (like <code>"artist"</code> or <code>"tracks"</code>), and a <code>value</code> (like <code>"Addicted to Love"</code>) to modify the data in this collection.</p>
-<p>If <code>prop</code> isn't <code>"tracks"</code> and <code>value</code> isn't empty (<code>""</code>), update or set the <code>value</code> for that record album's property.</p>
-<p>Your function must always return the entire collection object.</p>
-<p>There are several rules for handling incomplete data:</p>
-<p>If <code>prop</code> is <code>"tracks"</code> but the album doesn't have a <code>"tracks"</code> property, create an empty array before adding the new value to the album's corresponding property.</p>
-<p>If <code>prop</code> is <code>"tracks"</code> and <code>value</code> isn't empty (<code>""</code>), push the <code>value</code> onto the end of the album's existing <code>tracks</code> array.</p>
-<p>If <code>value</code> is empty (<code>""</code>), delete the given <code>prop</code> property from the album.</p><p><strong>Hints</strong><br>Use <code>bracket notation</code> when <a href="learn/javascript-algorithms-and-data-structures/basic-javascript/accessing-object-properties-with-variables" target="_blank">accessing object properties with variables</a>.</p>
-<p>Push is an array method you can read about on <a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/push" target="_blank">Mozilla Developer Network</a>.</p>
-<p>You may refer back to <a href="learn/javascript-algorithms-and-data-structures/basic-javascript/manipulating-complex-objects" target="_blank">Manipulating Complex Objects</a> Introducing JavaScript Object Notation (JSON) for a refresher.</p></section>
\ No newline at end of file
+<p>You are given a JSON object representing a part of your musical album collection. Each album has a unique id number as its key and several other properties. Not all albums have complete information.</p>
+<p>You start with an <code>updateRecords</code> function that takes an object like <code>collection</code>, an <code>id</code>, a <code>prop</code> (like <code>artist</code> or <code>tracks</code>), and a <code>value</code>. Complete the function using the rules below to modify the object passed to the function.</p>
+<p><ul>
+<li>Your function must always return the entire object.</li>
+<li>If <code>prop</code> isn't <code>tracks</code> and <code>value</code> isn't an empty string, update or set that album's <code>prop</code> to <code>value</code>.</li>
+<li>If <code>prop</code> is <code>tracks</code> but the album doesn't have a <code>tracks</code> property, create an empty array and add <code>value</code> to it.</li>
+<li>If <code>prop</code> is <code>tracks</code> and <code>value</code> isn't an empty string, add <code>value</code> to the end of the album's existing <code>tracks</code> array.</li>
+<li>If <code>value</code> is an empty string, delete the given <code>prop</code> property from the album.</li>
+</ul></p>
+<p><strong>Note:</strong> A copy of the <code>collection</code> object is used for the tests.</p>
+</section>
\ No newline at end of file
  • Number of tests do not match - English: 7 | Chinese: 8
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -19,7 +19,7 @@
     : "b is greater";
 }
 </code></pre></p>
-<p>However, this should be used with care as using multiple conditional operators without proper indentation may make your code hard to read. For example:</p>
+<p>It is considered best practice to format multiple conditional operators such that each condition is on a separate line, as shown above. Using multiple conditional operators without proper indentation may make your code hard to read. For example:</p>
 <p><pre><code class="language-js">function findGreaterOrEqual(a, b) {
   return (a === b) ? "a and b are equal" : (a > b) ? "a is greater" : "b is greater";
 }
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Use multiple conditional operators in the <code>checkSign</code> function to check if a number is positive, negative or zero. The function should return "positive", "negative" or "zero".</p></section>
\ No newline at end of file
+<p>In the <code>checkSign</code> function, use multiple conditional operators - following the recommended format used in <code>findGreaterOrEqual</code> - to check if a number is positive, negative or zero. The function should return <code>"positive"</code>, <code>"negative"</code> or <code>"zero"</code>.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Change the code to use the <code>++</code> operator on <code>myVar</code>.</p><p><strong>Hint</strong><br>Learn more about <a href="https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators#Increment_()" target="_blank">Arithmetic operators - Increment (++)</a>.</p></section>
\ No newline at end of file
+<p>Change the code to use the <code>++</code> operator on <code>myVar</code>.</p></section>
\ No newline at end of file
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 2
    Version Text
    Old
      <code>myVar = myVar + 1;</code> should be changed.
    
    New
      You should not use the assignment operator.
    
    

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,17 @@
 <section id="description">
-<p>Continuing from the previous challenge, we provide you another opportunity to create a recursive function to solve a problem.</p>
+<p>In a <a href="/learn/javascript-algorithms-and-data-structures/basic-javascript/replace-loops-using-recursion">previous challenge</a>, you learned how to use recursion to replace a for loop. Now, let's look at a more complex function that returns an array of consecutive integers starting with <code>1</code> through the number passed to the function.</p>
+<p>As mentioned in the previous challenge, there will be a <dfn>base case</dfn>.  The base case tells the recursive function when it no longer needs to call itself.  It is a simple case where the return value is already known. There will also be a <dfn>recursive call</dfn> which executes the original function with different arguments. If the function is written correctly, eventually the base case will be reached.</p>
+<p>For example, say you want to write a recursive function that returns an array containing the numbers <code>1</code> through <code>n</code>.  This function will need to accept an argument, <code>n</code>, representing the final number. Then it will need to call itself with progressively smaller values of <code>n</code> until it reaches <code>1</code>. You could write the function as follows:</p>
+<p><pre><code class="language-javascript">function countup(n) {
+  if (n &#x3C; 1) {
+    return [];
+  } else {
+    const countArray = countup(n - 1);
+    countArray.push(n);
+    return countArray;
+  }
+}
+console.log(countup(5)); // [ 1, 2, 3, 4, 5 ]
+</code></pre></p>
+<p>At first, this seems counterintuitive since the value of <code>n</code> <em>decreases</em>, but the values in the final array are <em>increasing</em>.  This happens because the push happens last, after the recursive call has returned.  At the point where <code>n</code> is pushed into the array, <code>countup(n - 1)</code> has already been evaluated and returned <code>[1, 2, ..., n - 1]</code>.</p>
 </section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,5 +1,5 @@
 <section id="instructions">
-<p>We have defined a function called <code>countdown</code> with two parameters.  The function should take an array in the <code>myArray</code> parameter and append the numbers n through 1 based on the <code>n</code> parameter.<br>
-For example, calling this function with <code>n = 5</code> will pad the array with the numbers <code>[5, 4, 3, 2, 1]</code> inside of it.
+<p>We have defined a function called <code>countdown</code> with one parameter (<code>n</code>).  The function should use recursion to return an array containing the integers <code>n</code> through <code>1</code> based on the <code>n</code> parameter. If the function is called with a number less than 1, the function should return an empty array.
+For example, calling this function with <code>n = 5</code> should return the array <code>[5, 4, 3, 2, 1]</code>.
 Your function must use recursion by calling itself and must not use loops of any kind.</p>
 </section>
\ No newline at end of file
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 1
    Version Text
    Old
      After calling <code>countdown(myArray, -1)</code>, myArray should be empty.
    
    New
      `countdown(-1)` should return an empty array.
    
    

    Test 2

    Version Text
    Old
      After calling <code>countdown(myArray, 10)</code>, myArray should contain <code>[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]</code>
    
    New
      `countdown(10)` should return `[10, 9, 8, 7, 6, 5, 4, 3, 2, 1]`
    
    

    Test 3

    Version Text
    Old
      After calling <code>countdown(myArray, 5)</code>, myArray should contain <code>[5, 4, 3, 2, 1]</code>
    
    New
      `countdown(5)` should return `[5, 4, 3, 2, 1]`
    
    

    Test 4

    Version Text
    Old
      Your code should not rely on any kind of loops (<code>for</code> or <code>while</code> or higher order functions such as <code>forEach</code>, <code>map</code>, <code>filter</code>, or <code>reduce</code>.).
    
    New
      Your code should not rely on any kind of loops (`for`, `while` or higher order functions such as `forEach`, `map`, `filter`, and `reduce`).
    
    

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,6 @@
 <section id="description">
-<p>If the <code>break</code> statement is omitted from a <code>switch</code> statement's <code>case</code>, the following <code>case</code> statement(s) are executed until a <code>break</code> is encountered. If you have multiple inputs with the same output, you can represent them in a <code>switch</code> statement like this:</p><p><pre><code class="language-js">switch(val) {
+<p>If the <code>break</code> statement is omitted from a <code>switch</code> statement's <code>case</code>, the following <code>case</code> statement(s) are executed until a <code>break</code> is encountered. If you have multiple inputs with the same output, you can represent them in a <code>switch</code> statement like this:</p><p><pre><code class="language-js">var result = "";
+switch(val) {
   case 1:
   case 2:
   case 3:

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,2 +1,8 @@
 <section id="description">
-<p>Just as we can build a string over multiple lines out of string <dfn>literals</dfn>, we can also append variables to a string using the plus equals (<code>+=</code>) operator.</p></section>
\ No newline at end of file
+<p>Just as we can build a string over multiple lines out of string <dfn>literals</dfn>, we can also append variables to a string using the plus equals (<code>+=</code>) operator.</p><p>Example:</p>
+<p><pre><code class="language-js">var anAdjective = "awesome!";
+var ourStr = "freeCodeCamp is ";
+ourStr += anAdjective;
+// ourStr is now "freeCodeCamp is awesome!"
+</code></pre></p>
+</section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Set <code>someAdjective</code> and append it to <code>myStr</code> using the <code>+=</code> operator.</p></section>
\ No newline at end of file
+<p>Set <code>someAdjective</code> to a string of at least 3 characters and append it to <code>myStr</code> using the <code>+=</code> operator.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Instructions section has changed
@@ -1,3 +1,2 @@
 <section id="instructions">
-<p>Modify function <code>multiplyAll</code> so that it multiplies the <code>product</code> variable by each number in the sub-arrays of <code>arr</code></p>
-</section>
\ No newline at end of file
+<p>Modify function <code>multiplyAll</code> so that it returns the product of all the numbers in the sub-arrays of <code>arr</code>.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,2 +1,7 @@
 <section id="description">
-<p>Sometimes you will need to build a string, <a href="https://en.wikipedia.org/wiki/Mad_Libs" target="_blank">Mad Libs</a> style. By using the concatenation operator (<code>+</code>), you can insert one or more variables into a string you're building.</p></section>
\ No newline at end of file
+<p>Sometimes you will need to build a string, <a href="https://en.wikipedia.org/wiki/Mad_Libs" target="_blank">Mad Libs</a> style. By using the concatenation operator (<code>+</code>), you can insert one or more variables into a string you're building.</p><p>Example:</p>
+<p><pre><code class="language-js">var ourName = "freeCodeCamp";
+var ourStr = "Hello, our name is " + ourName + ", how are you?";
+// ourStr is now "Hello, our name is freeCodeCamp, how are you?"
+</code></pre></p>
+</section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,21 +1,21 @@
 <section id="description">
-<p>Recursion is the concept that a function can be expressed in terms of itself. To help understand this, start by thinking about the following task: multiply the elements from <code>0</code> to <code>n</code> inclusive in an array to create the product of those elements. Using a <code>for</code> loop, you could do this:</p><p><pre><code class="language-js">  function multiply(arr, n) {
-    var product = arr[0];
-    for (var i = 1; i &#x3C;= n; i++) {
+<p>Recursion is the concept that a function can be expressed in terms of itself. To help understand this, start by thinking about the following task: multiply the first <code>n</code> elements of an array to create the product of those elements. Using a <code>for</code> loop, you could do this:</p><p><pre><code class="language-js">  function multiply(arr, n) {
+    var product = 1;
+    for (var i = 0; i &#x3C; n; i++) {
         product *= arr[i];
     }
     return product;
   }
 </code></pre></p>
-<p>However, notice that <code>multiply(arr, n) == multiply(arr, n - 1) * arr[n]</code>. That means you can rewrite <code>multiply</code> in terms of itself and never need to use a loop.</p>
+<p>However, notice that <code>multiply(arr, n) == multiply(arr, n - 1) * arr[n - 1]</code>. That means you can rewrite <code>multiply</code> in terms of itself and never need to use a loop.</p>
 <p><pre><code class="language-js">  function multiply(arr, n) {
     if (n &#x3C;= 0) {
-      return arr[0];
+      return 1;
     } else {
-      return multiply(arr, n - 1) * arr[n];
+      return multiply(arr, n - 1) * arr[n - 1];
     }
   }
 </code></pre></p>
-<p>The recursive version of <code>multiply</code> breaks down like this. In the <dfn>base case</dfn>, where <code>n &#x3C;= 0</code>, it returns the result, <code>arr[0]</code>. For larger values of <code>n</code>, it calls itself, but with <code>n - 1</code>. That function call is evaluated in the same way, calling <code>multiply</code> again until <code>n = 0</code>.  At this point, all the functions can return and the original <code>multiply</code> returns the answer.</p>
+<p>The recursive version of <code>multiply</code> breaks down like this. In the <dfn>base case</dfn>, where <code>n &#x3C;= 0</code>, it returns 1. For larger values of <code>n</code>, it calls itself, but with <code>n - 1</code>. That function call is evaluated in the same way, calling <code>multiply</code> again until <code>n &#x3C;= 0</code>.  At this point, all the functions can return and the original <code>multiply</code> returns the answer.</p>
 <p><strong>Note:</strong> Recursive functions must have a base case when they return without calling the function again (in this example, when <code>n &#x3C;= 0</code>), otherwise they can never finish executing.</p>
 </section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,3 +1,3 @@
 <section id="instructions">
-<p>Write a recursive function, <code>sum(arr, n)</code>, that returns the sum of the elements from <code>0</code> to <code>n</code> inclusive in an array <code>arr</code>.</p>
+<p>Write a recursive function, <code>sum(arr, n)</code>, that returns the sum of the first <code>n</code> elements of an array <code>arr</code>.</p>
 </section>
\ No newline at end of file
  • Number of tests do not match - English: 5 | Chinese: 4
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -10,5 +10,5 @@ arr[3]; // equals [[10,11,12], 13, 14]
 arr[3][0]; // equals [10,11,12]
 arr[3][0][1]; // equals 11
 </code></pre></p>
-<p><strong>Note</strong><br>There shouldn't be any spaces between the array name and the square brackets, like <code>array [0][0]</code> and even this <code>array [0][0]</code> is not allowed. Although JavaScript is able to process this correctly, this may confuse other programmers reading your code.</p>
+<p><strong>Note</strong><br>There shouldn't be any spaces between the array name and the square brackets, like <code>array [0][0]</code> and even this <code>array [0] [0]</code> is not allowed. Although JavaScript is able to process this correctly, this may confuse other programmers reading your code.</p>
 </section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,22 @@
 <section id="description">
 <p>We can also delete properties from objects like this:</p><p><code>delete ourDog.bark;</code></p>
+<p>Example:</p>
+<p><pre><code class="language-js">var ourDog = {
+  "name": "Camper",
+  "legs": 4,
+  "tails": 1,
+  "friends": ["everything!"],
+  "bark": "bow-wow"
+};
+
+delete ourDog.bark;
+</code></pre></p>
+<p>After the last line shown above, <code>ourDog</code> looks like:</p>
+<p><pre><code class="language-js">{
+  "name": "Camper",
+  "legs": 4,
+  "tails": 1,
+  "friends": ["everything!"]
+}
+</code></pre></p>
 </section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,6 +1,6 @@
 <section id="description">
 <p>There are many <dfn>comparison operators</dfn> in JavaScript. All of these operators return a boolean <code>true</code> or <code>false</code> value.</p>
-<p>The most basic operator is the equality operator <code>==</code>. The equality operator compares two values and returns <code>true</code> if they're equivalent or <code>false</code> if they are not. Note that equality is different from assignment (<code>=</code>), which assigns the value at the right of the operator to a variable in the left.</p><p><pre><code class="language-js">function equalityTest(myVal) {
+<p>The most basic operator is the equality operator <code>==</code>. The equality operator compares two values and returns <code>true</code> if they're equivalent or <code>false</code> if they are not. Note that equality is different from assignment (<code>=</code>), which assigns the value on the right of the operator to a variable on the left.</p><p><pre><code class="language-js">function equalityTest(myVal) {
   if (myVal == 10) {
      return "Equal";
   }

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,8 @@
 <section id="description">
 <p>You can use the same principle we just used to retrieve the last character in a string to retrieve the Nth-to-last character.</p>
 <p>For example, you can get the value of the third-to-last letter of the <code>var firstName = "Charles"</code> string by using <code>firstName[firstName.length - 3]</code></p>
+<p>Example:</p>
+<p><pre><code class="language-js">var firstName = "Charles";
+var thirdToLastLetter = firstName[firstName.length - 3]; // thirdToLastLetter is "l"
+</code></pre></p>
 </section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Use <dfn>bracket notation</dfn> to find the second-to-last character in the <code>lastName</code> string.</p><p><strong>Hint</strong><br>Try looking at the <code>thirdToLastLetterOfFirstName</code> variable declaration if you get stuck.</p></section>
\ No newline at end of file
+<p>Use <dfn>bracket notation</dfn> to find the second-to-last character in the <code>lastName</code> string.</p><p><strong>Hint: </strong> Try looking at the example above if you get stuck.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,8 @@
 <section id="description">
 <p><code>pop()</code> always removes the last element of an array. What if you want to remove the first?</p>
-<p>That's where <code>.shift()</code> comes in. It works just like <code>.pop()</code>, except it removes the first element instead of the last.</p></section>
\ No newline at end of file
+<p>That's where <code>.shift()</code> comes in. It works just like <code>.pop()</code>, except it removes the first element instead of the last.</p><p>Example:</p>
+<p><pre><code class="language-js">var ourArray = ["Stimpson", "J", ["cat"]];
+var removedFromOurArray = ourArray.shift();
+// removedFromOurArray now equals "Stimpson" and ourArray now equals ["J", ["cat"]].
+</code></pre></p>
+</section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,7 @@
 <section id="description">
 <p>You can also use <dfn>bracket notation</dfn> to get the character at other positions within a string.</p>
-<p>Remember that computers start counting at <code>0</code>, so the first character is actually the zeroth character.</p></section>
\ No newline at end of file
+<p>Remember that computers start counting at <code>0</code>, so the first character is actually the zeroth character.</p><p>Example:</p>
+<p><pre><code class="language-js">var firstName = "Ada";
+var secondLetterOfFirstName = firstName[1]; // secondLetterOfFirstName is "d"
+</code></pre></p>
+</section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Let's try to set <code>thirdLetterOfLastName</code> to equal the third letter of the <code>lastName</code> variable using bracket notation.</p><p><strong>Hint</strong><br>Try looking at the <code>secondLetterOfFirstName</code> variable declaration if you get stuck.</p></section>
\ No newline at end of file
+<p>Let's try to set <code>thirdLetterOfLastName</code> to equal the third letter of the <code>lastName</code> variable using bracket notation.</p><p><strong>Hint: </strong> Try looking at the example above if you get stuck.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,5 @@
 <section id="description">
-<p>Instead of generating a random number between zero and a given number like we did before, we can generate a random number that falls within a range of two specific numbers.</p>
+<p>Instead of generating a random whole number between zero and a given number like we did before, we can generate a random whole number that falls within a range of two specific numbers.</p>
 <p>To do this, we'll define a minimum number <code>min</code> and a maximum number <code>max</code>.</p>
 <p>Here's the formula we'll use. Take a moment to read it and try to understand what this code is doing:</p><p><code>Math.floor(Math.random() * (max - min + 1)) + min</code></p>
 </section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Create a function called <code>randomRange</code> that takes a range <code>myMin</code> and <code>myMax</code> and returns a random number that's greater than or equal to <code>myMin</code>, and is less than or equal to <code>myMax</code>, inclusive.</p></section>
\ No newline at end of file
+<p>Create a function called <code>randomRange</code> that takes a range <code>myMin</code> and <code>myMax</code> and returns a random whole number that's greater than or equal to <code>myMin</code>, and is less than or equal to <code>myMax</code>, inclusive.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Modify the function <code>abTest</code> so that if <code>a</code> or <code>b</code> are less than <code>0</code> the function will immediately exit with a value of <code>undefined</code>.</p><p><strong>Hint</strong><br>Remember that <a href="http://www.freecodecamp.org/challenges/understanding-uninitialized-variables" target="_blank"><code>undefined</code> is a keyword</a>, not a string.</p></section>
\ No newline at end of file
+<p>Modify the function <code>abTest</code> so that if <code>a</code> or <code>b</code> are less than <code>0</code> the function will immediately exit with a value of <code>undefined</code>.</p><p><strong>Hint</strong><br>Remember that <a href="https://www.freecodecamp.org/learn/javascript-algorithms-and-data-structures/basic-javascript/understanding-uninitialized-variables" target="_blank"><code>undefined</code> is a keyword</a>, not a string.</p></section>
\ No newline at end of file
  • Number of tests do not match - English: 7 | Chinese: 6
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,2 +1,7 @@
 <section id="description">
-<p>We can also use the <code>+=</code> operator to <dfn>concatenate</dfn> a string onto the end of an existing string variable. This can be very helpful to break a long string over several lines.</p><p><strong>Note</strong><br>Watch out for spaces. Concatenation does not add spaces between concatenated strings, so you'll need to add them yourself.</p></section>
\ No newline at end of file
+<p>We can also use the <code>+=</code> operator to <dfn>concatenate</dfn> a string onto the end of an existing string variable. This can be very helpful to break a long string over several lines.</p><p><strong>Note</strong><br>Watch out for spaces. Concatenation does not add spaces between concatenated strings, so you'll need to add them yourself.</p><p>Example:</p>
+<p><pre><code class="language-js">var ourStr = "I come first. ";
+ourStr += "I come second.";
+// ourStr is now "I come first. I come second."
+</code></pre></p>
+</section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,6 +1,11 @@
 <section id="description">
-<p>An easy way to append data to the end of an array is via the <code>push()</code> function.</p><p><code>.push()</code> takes one or more <dfn>parameters</dfn> and "pushes" them onto the end of the array.</p><p><pre><code class="language-js">var arr = [1,2,3];
-arr.push(4);
-// arr is now [1,2,3,4]
+<p>An easy way to append data to the end of an array is via the <code>push()</code> function.</p><p><code>.push()</code> takes one or more <dfn>parameters</dfn> and "pushes" them onto the end of the array.</p><p>Examples:</p>
+<p><pre><code class="language-js">var arr1 = [1,2,3];
+arr1.push(4);
+// arr1 is now [1,2,3,4]
+
+var arr2 = ["Stimpson", "J", "cat"];
+arr2.push(["happy", "joy"]);
+// arr2 now equals ["Stimpson", "J", "cat", ["happy", "joy"]]
 </code></pre></p>
 </section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,5 @@
 <section id="description">
-<p>A common task in JavaScript is to iterate through the contents of an array. One way to do that is with a <code>for</code> loop. This code will output each element of the array <code>arr</code> to the console:</p><p><pre><code class="language-js">var arr = [10,9,8,7,6];
+<p>A common task in JavaScript is to iterate through the contents of an array. One way to do that is with a <code>for</code> loop. This code will output each element of the array <code>arr</code> to the console:</p><p><pre><code class="language-js">var arr = [10, 9, 8, 7, 6];
 for (var i = 0; i &#x3C; arr.length; i++) {
    console.log(arr[i]);
 }
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 4
    Version Text
    Old
      You should not set <code>total</code> to 20 directly.
    
    New
      You should not attempt to directly assign the value 20 to `total`.
    
    

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,4 @@
 <section id="description">
-<p>If you'll recall from our discussion of <a href="learn/javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator" target="_blank">Storing Values with the Assignment Operator</a>, everything to the right of the equal sign is resolved before the value is assigned. This means we can take the return value of a function and assign it to a variable.</p>
+<p>If you'll recall from our discussion of <a href="/learn/javascript-algorithms-and-data-structures/basic-javascript/storing-values-with-the-assignment-operator" target="_blank">Storing Values with the Assignment Operator</a>, everything to the right of the equal sign is resolved before the value is assigned. This means we can take the return value of a function and assign it to a variable.</p>
 <p>Assume we have pre-defined a function <code>sum</code> which adds two numbers together, then:</p><p><code>ourSum = sum(5, 12);</code></p>
 <p>will call <code>sum</code> function, which returns a value of <code>17</code> and assigns it to <code>ourSum</code> variable.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -2,4 +2,14 @@
 <p>You can add new properties to existing JavaScript objects the same way you would modify them.</p>
 <p>Here's how we would add a <code>"bark"</code> property to <code>ourDog</code>:</p><p><code>ourDog.bark = "bow-wow";</code></p>
 <p>or</p><p><code>ourDog["bark"] = "bow-wow";</code></p>
-<p>Now when we evaluate <code>ourDog.bark</code>, we'll get his bark, "bow-wow".</p></section>
\ No newline at end of file
+<p>Now when we evaluate <code>ourDog.bark</code>, we'll get his bark, "bow-wow".</p><p>Example:</p>
+<p><pre><code class="language-js">var ourDog = {
+  "name": "Camper",
+  "legs": 4,
+  "tails": 1,
+  "friends": ["everything!"]
+};
+
+ourDog.bark = "bow-wow";
+</code></pre></p>
+</section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,8 @@
 <section id="description">
 <p><dfn>Bracket notation</dfn> is a way to get a character at a specific <code>index</code> within a string.</p>
 <p>Most modern programming languages, like JavaScript, don't start counting at 1 like humans do. They start at 0. This is referred to as <dfn>Zero-based</dfn> indexing.</p>
-<p>For example, the character at index 0 in the word "Charles" is "C". So if <code>var firstName = "Charles"</code>, you can get the value of the first letter of the string by using <code>firstName[0]</code>.</p></section>
\ No newline at end of file
+<p>For example, the character at index 0 in the word "Charles" is "C". So if <code>var firstName = "Charles"</code>, you can get the value of the first letter of the string by using <code>firstName[0]</code>.</p><p>Example:</p>
+<p><pre><code class="language-js">var firstName = "Charles";
+var firstLetter = firstName[0]; // firstLetter is "C"
+</code></pre></p>
+</section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Use bracket notation to find the first character in the <code>lastName</code> variable and assign it to <code>firstLetterOfLastName</code>.</p><p><strong>Hint</strong><br>Try looking at the <code>firstLetterOfFirstName</code> variable declaration if you get stuck.</p></section>
\ No newline at end of file
+<p>Use bracket notation to find the first character in the <code>lastName</code> variable and assign it to <code>firstLetterOfLastName</code>.</p><p><strong>Hint: </strong> Try looking at the example above if you get stuck.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Modify the function <code>checkObj</code> to test <code>myObj</code> for <code>checkProp</code>. If the property is found, return that property's value. If not, return <code>"Not Found"</code>.</p></section>
\ No newline at end of file
+<p>Modify the function <code>checkObj</code> to test if an object passed to the function (<code>obj</code>) contains a specific property (<code>checkProp</code>). If the property is found, return that property's value. If not, return <code>"Not Found"</code>.</p></section>
\ No newline at end of file
  • Number of tests do not match - English: 6 | Chinese: 3
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Instructions section has changed
@@ -1,2 +1,4 @@
 <section id="instructions">
-<p>Declare a local variable <code>myVar</code> inside <code>myLocalScope</code>. Run the tests and then follow the instructions commented out in the editor.</p><p><strong>Hint</strong><br>Refreshing the page may help if you get stuck.</p></section>
\ No newline at end of file
+<p>The editor has two <code>console.log</code>s to help you see what is happening. Check the console as you code to see how it changes.  Declare a local variable <code>myVar</code> inside <code>myLocalScope</code> and run the tests.</p>
+<p><strong>Note:</strong> The console will still have 'ReferenceError: myVar is not defined', but this will not cause the tests to fail.</p>
+</section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,7 @@
 <section id="description">
 <p>In order to get the last letter of a string, you can subtract one from the string's length.</p>
-<p>For example, if <code>var firstName = "Charles"</code>, you can get the value of the last letter of the string by using <code>firstName[firstName.length - 1]</code>.</p></section>
\ No newline at end of file
+<p>For example, if <code>var firstName = "Charles"</code>, you can get the value of the last letter of the string by using <code>firstName[firstName.length - 1]</code>.</p><p>Example:</p>
+<p><pre><code class="language-js">var firstName = "Charles";
+var lastLetter = firstName[firstName.length - 1]; // lastLetter is "s"
+</code></pre></p>
+</section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Use <dfn>bracket notation</dfn> to find the last character in the <code>lastName</code> variable.</p><p><strong>Hint</strong><br>Try looking at the <code>lastLetterOfFirstName</code> variable declaration if you get stuck.</p></section>
\ No newline at end of file
+<p>Use <dfn>bracket notation</dfn> to find the last character in the <code>lastName</code> variable.</p><p><strong>Hint: </strong> Try looking at the example above if you get stuck.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -3,15 +3,14 @@
   this.name = name;
 }
 
-typeof Bird.prototype; // => object
+typeof Bird.prototype; // yields 'object'
 </code></pre></p>
 <p>Because a <code>prototype</code> is an object, a <code>prototype</code> can have its own <code>prototype</code>! In this case, the <code>prototype</code> of <code>Bird.prototype</code> is <code>Object.prototype</code>:</p>
-<p><pre><code class="language-js">Object.prototype.isPrototypeOf(Bird.prototype);
-// returns true
+<p><pre><code class="language-js">Object.prototype.isPrototypeOf(Bird.prototype); // returns true
 </code></pre></p>
 <p>How is this useful? You may recall the <code>hasOwnProperty</code> method from a previous challenge:</p>
 <p><pre><code class="language-js">let duck = new Bird("Donald");
-duck.hasOwnProperty("name"); // => true
+duck.hasOwnProperty("name"); // yields true
 </code></pre></p>
 <p>The <code>hasOwnProperty</code> method is defined in <code>Object.prototype</code>, which can be accessed by <code>Bird.prototype</code>, which can then be accessed by <code>duck</code>. This is an example of the <code>prototype</code> chain.
 In this <code>prototype</code> chain, <code>Bird</code> is the <code>supertype</code> for <code>duck</code>, while <code>duck</code> is the <code>subtype</code>. <code>Object</code> is a <code>supertype</code> for both <code>Bird</code> and <code>duck</code>.

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,5 @@
 <section id="description">
-<p>In previous lessons, you learned that an object can inherit its behavior (methods) from another object by cloning its <code>prototype</code> object:</p>
+<p>In previous lessons, you learned that an object can inherit its behavior (methods) from another object by referencing its <code>prototype</code> object:</p>
 <p><pre><code class="language-js">ChildObject.prototype = Object.create(ParentObject.prototype);
 </code></pre></p>
 <p>Then the <code>ChildObject</code> received its own methods by chaining them onto its <code>prototype</code>:</p>

Show/Hide sections with changes/issues
  • Number of tests do not match - English: 7 | Chinese: 5
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -2,5 +2,4 @@
 <p>Return true if the string in the first element of the array contains all of the letters of the string in the second element of the array.</p>
 <p>For example, <code>["hello", "Hello"]</code>, should return true because all of the letters in the second string are present in the first, ignoring case.</p>
 <p>The arguments <code>["hello", "hey"]</code> should return false because the string "hello" does not contain a "y".</p>
-<p>Lastly, <code>["Alien", "line"]</code>, should return true because all of the letters in "line" are present in "Alien".</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>Lastly, <code>["Alien", "line"]</code>, should return true because all of the letters in "line" are present in "Alien".</p></section>
\ No newline at end of file
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 10
    Version Text
    Old
      <code>mutation(["ate", "date"] should return false</code> should return false.
    
    New
      `mutation(["ate", "date"]` should return false.
    
    
    • Number of tests do not match - English: 12 | Chinese: 9
      Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,3 @@
 <section id="description">
 <p>Check if a string (first argument, <code>str</code>) ends with the given target string (second argument, <code>target</code>).</p>
-<p>This challenge <em>can</em> be solved with the <code>.endsWith()</code> method, which was introduced in ES2015. But for the purpose of this challenge, we would like you to use one of the JavaScript substring methods instead.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>This challenge <em>can</em> be solved with the <code>.endsWith()</code> method, which was introduced in ES2015. But for the purpose of this challenge, we would like you to use one of the JavaScript substring methods instead.</p></section>
\ No newline at end of file
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 7
    Version Text
    Old
      <code>confirmEnding("Open sesame", "pen")</code> should return false.
    
    New
      `confirmEnding("Open sesame", "sage")` should return false.
    
    

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,2 @@
 <section id="description">
-<p>Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a <code>...</code> ending.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>Truncate a string (first argument) if it is longer than the given maximum string length (second argument). Return the truncated string with a <code>...</code> ending.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,2 @@
 <section id="description">
-<p>Repeat a given string <code>str</code> (first argument) for <code>num</code> times (second argument). Return an empty string if <code>num</code> is not a positive number.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>Repeat a given string <code>str</code> (first argument) for <code>num</code> times (second argument). Return an empty string if <code>num</code> is not a positive number. For the purpose of this challenge, do <em>not</em> use the built-in <code>.repeat()</code> method.</p></section>
\ No newline at end of file
  • Number of tests do not match - English: 8 | Chinese: 7
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,3 @@
 <section id="description">
 <p>Check if a value is classified as a boolean primitive. Return true or false.</p>
-<p>Boolean primitives are true and false.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>Boolean primitives are true and false.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,4 @@
 <section id="description">
 <p>Return the lowest index at which a value (second argument) should be inserted into an array (first argument) once it has been sorted. The returned value should be a number.</p>
 <p>For example, <code>getIndexToIns([1,2,3,4], 1.5)</code> should return <code>1</code> because it is greater than <code>1</code> (index 0), but less than <code>2</code> (index 1).</p>
-<p>Likewise, <code>getIndexToIns([20,3,5], 19)</code> should return <code>2</code> because once the array has been sorted it will look like <code>[3,5,20]</code> and <code>19</code> is less than <code>20</code> (index 2) and greater than <code>5</code> (index 1).</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>Likewise, <code>getIndexToIns([20,3,5], 19)</code> should return <code>2</code> because once the array has been sorted it will look like <code>[3,5,20]</code> and <code>19</code> is less than <code>20</code> (index 2) and greater than <code>5</code> (index 1).</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,2 @@
 <section id="description">
-<p>Write a function that splits an array (first argument) into groups the length of <code>size</code> (second argument) and returns them as a two-dimensional array.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>Write a function that splits an array (first argument) into groups the length of <code>size</code> (second argument) and returns them as a two-dimensional array.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -3,5 +3,4 @@
 <p>If the integer is represented with the letter n, a factorial is the product of all positive integers less than or equal to n.</p>
 <p>Factorials are often represented with the shorthand notation <code>n!</code></p>
 <p>For example: <code>5! = 1 * 2 * 3 * 4 * 5 = 120</code></p>
-<p>Only integers greater than or equal to zero will be supplied to the function.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>Only integers greater than or equal to zero will be supplied to the function.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,3 @@
 <section id="description">
 <p>Return the length of the longest word in the provided sentence.</p>
-<p>Your response should be a number.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>Your response should be a number.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,3 @@
 <section id="description">
 <p>Return the provided string with the first letter of each word capitalized. Make sure the rest of the word is in lower case.</p>
-<p>For the purpose of this exercise, you should also capitalize connecting words like "the" and "of".</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>For the purpose of this exercise, you should also capitalize connecting words like "the" and "of".</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,4 @@
 <section id="description">
 <p>Remove all falsy values from an array.</p>
 <p>Falsy values in JavaScript are <code>false</code>, <code>null</code>, <code>0</code>, <code>""</code>, <code>undefined</code>, and <code>NaN</code>.</p>
-<p>Hint: Try converting each value to a Boolean.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>Hint: Try converting each value to a Boolean.</p></section>
\ No newline at end of file
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 4
    Version Text
    Old
      <code>bouncer([1, null, NaN, 2, undefined])</code> should return <code>[1, 2]</code>.
    
    New
      `bouncer([null, NaN, 1, 2, undefined])` should return `[1, 2]`.
    
    

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,6 +1,5 @@
 <section id="description">
 <p>You are given two arrays and an index.</p>
-<p>Use the array methods <code>slice</code> and <code>splice</code> to copy each element of the first array into the second array, in order.</p>
+<p>Copy each element of the first array into the second array, in order.</p>
 <p>Begin inserting elements at index <code>n</code> of the second array.</p>
-<p>Return the resulting array. The input arrays should remain the same after the function runs.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>Return the resulting array. The input arrays should remain the same after the function runs.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,3 @@
 <section id="description">
 <p>Return an array consisting of the largest number from each provided sub-array. For simplicity, the provided array will contain exactly 4 sub-arrays.</p>
-<p>Remember, you can iterate through an array with a simple for loop, and access each member with array syntax <code>arr[i]</code>.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>Remember, you can iterate through an array with a simple for loop, and access each member with array syntax <code>arr[i]</code>.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,3 @@
 <section id="description">
-<p>Create a function that looks through an array (first argument) and returns the first element in the array that passes a truth test (second argument). If no element passes the test, return undefined.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>Create a function that looks through an array <code>arr</code> and returns the first element in it that passes a 'truth test'. This means that given an element <code>x</code>, the 'truth test' is passed if <code>func(x)</code> is <code>true</code>. If no element passes the test, return <code>undefined</code>.</p>
+</section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,4 @@
 <section id="description">
 <p>Reverse the provided string.</p>
 <p>You may need to turn the string into an array before you can reverse it.</p>
-<p>Your result must be a string.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>Your result must be a string.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 1
    Version Text
    Old
      <code>htmlColorNames</code> should return <code>["DarkSalmon", "BlanchedAlmond", "LavenderBlush", "PaleTurqoise", "FireBrick"]</code>
    
    New
      `htmlColorNames` should return `["DarkSalmon", "BlanchedAlmond", "LavenderBlush", "PaleTurquoise", "FireBrick"]`
    
    

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,18 +1,29 @@
 <section id="description">
-<p>At their most basic, objects are just collections of <dfn>key-value pairs</dfn>, or in other words, pieces of data mapped to unique identifiers that we call <dfn>properties</dfn> or <dfn>keys</dfn>. Let's take a look at a very simple example:</p><p><pre><code class="language-js">let FCC_User = {
-  username: 'awesome_coder',
-  followers: 572,
-  points: 1741,
-  completedProjects: 15
+<p>At their most basic, objects are just collections of <dfn>key-value</dfn> pairs. In other words, they are pieces of data (<dfn>values</dfn>) mapped to unique identifiers called <dfn>properties</dfn> (<dfn>keys</dfn>). Take a look at an example:</p><p><pre><code class="language-js">const tekkenCharacter = {
+  player: 'Hwoarang',
+  fightingStyle: 'Tae Kwon Doe',
+  human: true
 };
 </code></pre></p>
-<p>The above code defines an object called <code>FCC_User</code> that has four <dfn>properties</dfn>, each of which map to a specific value. If we wanted to know the number of <code>followers</code> <code>FCC_User</code> has, we can access that property by writing:</p>
-<p><pre><code class="language-js">let userData = FCC_User.followers;
-// userData equals 572
+<p>The above code defines a Tekken video game character object called <code>tekkenCharacter</code>. It has three properties, each of which map to a specific value. If you want to add an additional property, such as "origin", it can be done by assigning <code>origin</code> to the object:</p>
+<p><pre><code class="language-js">tekkenCharacter.origin = 'South Korea';
 </code></pre></p>
-<p>This is called <dfn>dot notation</dfn>. Alternatively, we can also access the property with brackets, like so:</p>
-<p><pre><code class="language-js">let userData = FCC_User['followers'];
-// userData equals 572
+<p>This uses dot notation. If you were to observe the <code>tekkenCharacter</code> object, it will now include the <code>origin</code> property. Hwoarang also had distinct orange hair. You can add this property with bracket notation by doing:</p>
+<p><pre><code class="language-js">tekkenCharacter['hair color'] = 'dyed orange';
+</code></pre></p>
+<p>Bracket notation is required if your property has a space in it or if you want to use a variable to name the property. In the above case, the property is enclosed in quotes to denote it as a string and will be added exactly as shown. Without quotes, it will be evaluated as a variable and the name of the property will be whatever value the variable is. Here's an example with a variable:</p>
+<p><pre><code class="language-js">const eyes = 'eye color';
+
+tekkenCharacter[eyes] = 'brown';
+</code></pre></p>
+<p>After adding all the examples, the object will look like this:</p>
+<p><pre><code class="language-js">{
+  player: 'Hwoarang',
+  fightingStyle: 'Tae Kwon Doe',
+  human: true,
+  origin: 'South Korea',
+  'hair color': 'dyed orange',
+  'eye color': 'brown'
+};
 </code></pre></p>
-<p>Notice that with <dfn>bracket notation</dfn>, we enclosed <code>followers</code> in quotes. This is because the brackets actually allow us to pass a variable in to be evaluated as a property name (hint: keep this in mind for later!). Had we passed <code>followers</code> in without the quotes, the JavaScript engine would have attempted to evaluate it as a variable, and a <code>ReferenceError: followers is not defined</code> would have been thrown.</p>
 </section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Using the same syntax, we can also <em><strong>add new</strong></em> key-value pairs to objects. We've created a <code>foods</code> object with three entries. Add three more entries: <code>bananas</code> with a value of <code>13</code>, <code>grapes</code> with a value of <code>35</code>, and <code>strawberries</code> with a value of <code>27</code>.</p></section>
\ No newline at end of file
+<p> A <code>foods</code> object has been created with three entries. Using the syntax of your choice, add three more entries to it: <code>bananas</code> with a value of <code>13</code>, <code>grapes</code> with a value of <code>35</code>, and <code>strawberries</code> with a value of <code>27</code>.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -7,10 +7,13 @@
     online: 80,
     onlineStatus: {
       active: 67,
-      away: 13
+      away: 13,
+      busy: 8
     }
   }
 };
 </code></pre></p>
-<p><code>nestedObject</code> has three unique keys: <code>id</code>, whose value is a number, <code>date</code> whose value is a string, and <code>data</code>, whose value is an object which has yet another object nested within it. While structures can quickly become complex, we can still use the same notations to access the information we need.</p>
+<p><code>nestedObject</code> has three properties: <code>id</code> (value is a number), <code>date</code> (value is a string), and <code>data</code> (value is an object with its nested structure). While structures can quickly become complex, we can still use the same notations to access the information we need. To assign the value <code>10</code> to the <code>busy</code> property of the nested <code>onlineStatus</code> object, we use dot notation to reference the property:</p>
+<p><pre><code class="language-js">nestedObject.data.onlineStatus.busy = 10;
+</code></pre></p>
 </section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Here we've defined an object, <code>userActivity</code>, which includes another object nested within it. You can modify properties on this nested object in the same way you modified properties in the last challenge. Set the value of the <code>online</code> key to <code>45</code>.</p></section>
\ No newline at end of file
+<p>Here we've defined an object <code>userActivity</code>, which includes another object nested within it. Set the value of the <code>online</code> key to <code>45</code>.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Number of tests do not match - English: 6 | Chinese: 5
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,5 @@
 <section id="description">
-<p>The next method we will cover is <code>slice()</code>. <code>slice()</code>, rather than modifying an array, copies, or <em>extracts</em>, a given number of elements to a new array, leaving the array it is called upon untouched. <code>slice()</code> takes only 2 parameters — the first is the index at which to begin extraction, and the second is the index at which to stop extraction (extraction will occur up to, but not including the element at this index). Consider this:</p><p><pre><code class="language-js">let weatherConditions = ['rain', 'snow', 'sleet', 'hail', 'clear'];
+<p>The next method we will cover is <code>slice()</code>. Rather than modifying an array, <code>slice()</code> copies or <em>extracts</em> a given number of elements to a new array, leaving the array it is called upon untouched. <code>slice()</code> takes only 2 parameters — the first is the index at which to begin extraction, and the second is the index at which to stop extraction (extraction will occur up to, but not including the element at this index). Consider this:</p><p><pre><code class="language-js">let weatherConditions = ['rain', 'snow', 'sleet', 'hail', 'clear'];
 
 let todaysWeather = weatherConditions.slice(1, 3);
 // todaysWeather equals ['snow', 'sleet'];

Show/Hide sections with changes/issues
  • Description section has changed
@@ -3,6 +3,6 @@
 <p>In practice, we can use the spread operator to copy an array like so:</p><p><pre><code class="language-js">let thisArray = [true, true, undefined, false, null];
 let thatArray = [...thisArray];
 // thatArray equals [true, true, undefined, false, null]
-// thisArray remains unchanged, and is identical to thatArray
+// thisArray remains unchanged and thatArray contains the same elements as thisArray
 </code></pre></p>
 </section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -2,5 +2,4 @@
 <p>One of the simplest and most widely known <dfn>ciphers</dfn> is a <dfn>Caesar cipher</dfn>, also known as a <dfn>shift cipher</dfn>. In a shift cipher the meanings of the letters are shifted by some set amount.</p>
 <p>A common modern use is the <a href="https://en.wikipedia.org/wiki/ROT13" target="_blank">ROT13</a> cipher, where the values of the letters are shifted by 13 places. Thus 'A' ↔ 'N', 'B' ↔  'O' and so on.</p>
 <p>Write a function which takes a <a href="https://en.wikipedia.org/wiki/ROT13" target="_blank">ROT13</a> encoded string as input and returns a decoded string.</p>
-<p>All letters will be uppercase. Do not transform any non-alphabetic character (i.e. spaces, punctuation), but do pass them on.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>All letters will be uppercase. Do not transform any non-alphabetic character (i.e. spaces, punctuation), but do pass them on.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -2,5 +2,4 @@
 <p>Return <code>true</code> if the given string is a palindrome. Otherwise, return <code>false</code>.</p>
 <p>A <dfn>palindrome</dfn> is a word or sentence that's spelled the same way both forward and backward, ignoring punctuation, case, and spacing.</p><p><strong>Note</strong><br>You'll need to remove <strong>all non-alphanumeric characters</strong> (punctuation, spaces and symbols) and turn everything into the same case (lower or upper case) in order to check for palindromes.</p>
 <p>We'll pass strings with varying formats, such as <code>"racecar"</code>, <code>"RaceCar"</code>, and <code>"race CAR"</code> among others.</p>
-<p>We'll also pass strings with special symbols, such as <code>"2A3*3a2"</code>, <code>"2A3  3a2"</code>, and <code>"2_A3*3#A2"</code>.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Write your own code.</p></section>
\ No newline at end of file
+<p>We'll also pass strings with special symbols, such as <code>"2A3*3a2"</code>, <code>"2A3  3a2"</code>, and <code>"2_A3*3#A2"</code>.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -3,6 +3,18 @@
 <p>The <code>checkCashRegister()</code> function should always return an object with a <code>status</code> key and a <code>change</code> key.</p>
 <p>Return <code>{status: "INSUFFICIENT_FUNDS", change: []}</code> if cash-in-drawer is less than the change due, or if you cannot return the exact change.</p>
 <p>Return <code>{status: "CLOSED", change: [...]}</code> with cash-in-drawer as the value for the key <code>change</code> if it is equal to the change due.</p>
-<p>Otherwise, return <code>{status: "OPEN", change: [...]}</code>, with the change due in coins and bills, sorted in highest to lowest order, as the value of the <code>change</code> key.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p><p><table class="table table-striped"><tbody><tr><th>Currency Unit</th><th>Amount</th></tr><tr><td>Penny</td><td>/bin/sh.01 (PENNY)</td></tr><tr><td>Nickel</td><td>/bin/sh.05 (NICKEL)</td></tr><tr><td>Dime</td><td>/bin/sh.1 (DIME)</td></tr><tr><td>Quarter</td><td>/bin/sh.25 (QUARTER)</td></tr><tr><td>Dollar</td><td> (DOLLAR)</td></tr><tr><td>Five Dollars</td><td> (FIVE)</td></tr><tr><td>Ten Dollars</td><td> (TEN)</td></tr><tr><td>Twenty Dollars</td><td> (TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td> (ONE HUNDRED)</td></tr></tbody></table></p>
+<p>Otherwise, return <code>{status: "OPEN", change: [...]}</code>, with the change due in coins and bills, sorted in highest to lowest order, as the value of the <code>change</code> key.</p><p><table class="table table-striped"><tbody><tr><th>Currency Unit</th><th>Amount</th></tr><tr><td>Penny</td><td>/bin/sh.01 (PENNY)</td></tr><tr><td>Nickel</td><td>/bin/sh.05 (NICKEL)</td></tr><tr><td>Dime</td><td>/bin/sh.1 (DIME)</td></tr><tr><td>Quarter</td><td>/bin/sh.25 (QUARTER)</td></tr><tr><td>Dollar</td><td> (ONE)</td></tr><tr><td>Five Dollars</td><td> (FIVE)</td></tr><tr><td>Ten Dollars</td><td> (TEN)</td></tr><tr><td>Twenty Dollars</td><td> (TWENTY)</td></tr><tr><td>One-hundred Dollars</td><td> (ONE HUNDRED)</td></tr></tbody></table></p>
+<p>See below for an example of a cash-in-drawer array:</p>
+<p><pre><code class="language-js">[
+  ["PENNY", 1.01],
+  ["NICKEL", 2.05],
+  ["DIME", 3.1],
+  ["QUARTER", 4.25],
+  ["ONE", 90],
+  ["FIVE", 55],
+  ["TEN", 20],
+  ["TWENTY", 60],
+  ["ONE HUNDRED", 100]
+]
+</code></pre></p>
 </section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,4 @@
 <section id="description">
 <p>Return <code>true</code> if the passed string looks like a valid US phone number.</p>
 <p>The user may fill out the form field any way they choose as long as it has the format of a valid US number. The following are examples of valid formats for US numbers (refer to the tests below for other variants):</p><p><blockquote>555-555-5555<br>(555)555-5555<br>(555) 555-5555<br>555 555 5555<br>5555555555<br>1 555 555 5555</blockquote></p>
-<p>For this challenge you will be presented with a string such as <code>800-692-7753</code> or <code>8oo-six427676;laskdjf</code>. Your job is to validate or reject the US phone number based on any combination of the formats provided above. The area code is required. If the country code is provided, you must confirm that the country code is <code>1</code>. Return <code>true</code> if the string is a valid US phone number; otherwise return <code>false</code>.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>For this challenge you will be presented with a string such as <code>800-692-7753</code> or <code>8oo-six427676;laskdjf</code>. Your job is to validate or reject the US phone number based on any combination of the formats provided above. The area code is required. If the country code is provided, you must confirm that the country code is <code>1</code>. Return <code>true</code> if the string is a valid US phone number; otherwise return <code>false</code>.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,4 +1,3 @@
 <section id="description">
 <p>Convert the given number into a roman numeral.</p>
-<p>All <a href="http://www.mathsisfun.com/roman-numerals.html" target="_blank">roman numerals</a> answers should be provided in upper-case.</p>
-<p>Remember to use <a href="https://www.freecodecamp.org/forum/t/how-to-get-help-when-you-are-stuck-coding/19514" target="_blank">Read-Search-Ask</a> if you get stuck. Try to pair program. Write your own code.</p></section>
\ No newline at end of file
+<p>All <a href="http://www.mathsisfun.com/roman-numerals.html" target="_blank">roman numerals</a> answers should be provided in upper-case.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Number of tests do not match - English: 5 | Chinese: 6
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Number of tests do not match - English: 3 | Chinese: 2
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,3 +1,2 @@
 <section id="description">
-<p>It would teach us a lot about the <code>filter</code> method if we try to implement a version of it that behaves exactly like <code>Array.prototype.filter()</code>. It can use either a <code>for</code> loop or <code>Array.prototype.forEach()</code>.</p>
-<p>Note: A pure function is allowed to alter local variables defined within its scope, although, it's preferable to avoid that as well.</p></section>
\ No newline at end of file
+<p>You might learn a lot about the <code>filter</code> method if you implement your own version of it. It is recommended you use a <code>for</code> loop or <code>Array.prototype.forEach()</code>.</p></section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Write your own <code>Array.prototype.myFilter()</code>, which should behave exactly like <code>Array.prototype.filter()</code>. You may use a <code>for</code> loop or the <code>Array.prototype.forEach()</code> method.</p></section>
\ No newline at end of file
+<p>Write your own <code>Array.prototype.myFilter()</code>, which should behave exactly like <code>Array.prototype.filter()</code>. You should not use the built-in <code>filter</code> method. The <code>Array</code> instance can be accessed in the <code>myFilter</code> method using <code>this</code>.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Instructions section has changed
@@ -1,3 +1,3 @@
 <section id="instructions">
 <p>Let's update the <code>incrementer</code> function to clearly declare its dependencies.</p>
-<p>Write the <code>incrementer</code> function so it takes an argument, and then increases the value by one.</p></section>
\ No newline at end of file
+<p>Write the <code>incrementer</code> function so it takes an argument, and then returns a result after increasing the value by one.</p></section>
\ No newline at end of file
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 1
    Version Text
    Old
      Your function <code>incrementer</code> should not change the value of <code>fixedValue</code>.
    
    New
      Your function `incrementer` should not change the value of `fixedValue` (which is `4`).
    
    

    Test 2

    Version Text
    Old
      Your <code>incrementer</code> function should take a parameter.
    
    New
      Your `incrementer` function should take an argument.
    
    

Show/Hide sections with changes/issues
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 2
    Version Text
    Old
      for or while loops or forEach should not be used.
    
    New
      `for`, `while`, and `forEach` should not be used.
    
    

Show/Hide sections with changes/issues
  • Number of tests do not match - English: 5 | Chinese: 4
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,4 @@
 <section id="description">
 <p>As you have seen from applying <code>Array.prototype.map()</code>, or simply <code>map()</code> earlier, the <code>map</code> method returns an array of the same length as the one it was called on. It also doesn't alter the original array, as long as its callback function doesn't.</p>
 <p>In other words, <code>map</code> is a pure function, and its output depends solely on its inputs. Plus, it takes another function as its argument.</p>
-<p>It would teach us a lot about <code>map</code> to try to implement a version of it that behaves exactly like the <code>Array.prototype.map()</code> with a <code>for</code> loop or <code>Array.prototype.forEach()</code>.</p>
-<p>Note: A pure function is allowed to alter local variables defined within its scope, although, it's preferable to avoid that as well.</p></section>
\ No newline at end of file
+<p>You might learn a lot about the <code>map</code> method if you implement your own version of it. It is recommended you use a <code>for</code> loop or <code>Array.prototype.forEach()</code>.</p></section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Write your own <code>Array.prototype.myMap()</code>, which should behave exactly like <code>Array.prototype.map()</code>. You may use a <code>for</code> loop or the <code>forEach</code> method.</p></section>
\ No newline at end of file
+<p>Write your own <code>Array.prototype.myMap()</code>, which should behave exactly like <code>Array.prototype.map()</code>. You should not use the built-in <code>map</code> method. The <code>Array</code> instance can be accessed in the <code>myMap</code> method using <code>this</code>.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,5 +1,5 @@
 <section id="description">
 <p>So far, we have seen two distinct principles for functional programming:</p>
-<p>1) Don't alter a variable or object - create new variables and objects and return them if need be from a function.</p>
-<p>2) Declare function arguments - any computation inside a function depends only on the arguments, and not on any global object or variable.</p>
+<p>1) Don't alter a variable or object - create new variables and objects and return them if need be from a function. Hint: using something like <code>var newArr = arrVar</code>, where <code>arrVar</code> is an array will simply create a reference to the existing variable and not a copy. So changing a value in <code>newArr</code> would change the value in <code>arrVar</code>.</p>
+<p>2) Declare function parameters - any computation inside a function depends only on the arguments passed to the function, and not on any global object or variable.</p>
 <p>Adding one to a number is not very exciting, but we can apply these principles when working with arrays or more complex objects.</p></section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,2 +1,3 @@
 <section id="instructions">
-<p>Rewrite the code so the global array <code>bookList</code> is not changed inside either function. The <code>add</code> function should add the given <code>bookName</code> to the end of an array. The <code>remove</code> function should remove the given <code>bookName</code> from an array. Both functions should return an array, and any new parameters should be added before the <code>bookName</code> parameter.</p></section>
\ No newline at end of file
+<p>Rewrite the code so the global array <code>bookList</code> is not changed inside either function. The <code>add</code> function should add the given <code>bookName</code> to the end of the array passed to it and return a new array (list). The <code>remove</code> function should remove the given <code>bookName</code> from the array passed to it.</p><p><strong>Note:</strong> Both functions should return an array, and any new parameters should be added before the <code>bookName</code> parameter.</p>
+</section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Number of tests do not match - English: 4 | Chinese: 3
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,8 +1,7 @@
 <section id="description">
 <p>The <code>const</code> declaration has many use cases in modern JavaScript.</p>
 <p>Some developers prefer to assign all their variables using <code>const</code> by default, unless they know they will need to reassign the value. Only in that case, they use <code>let</code>.</p>
-<p>However, it is important to understand that objects (including arrays and functions) assigned to a variable using <code>const</code> are still mutable. Using the <code>const</code> declaration only prevents reassignment of the variable identifier.</p><p><pre><code class="language-js">"use strict";
-const s = [5, 6, 7];
+<p>However, it is important to understand that objects (including arrays and functions) assigned to a variable using <code>const</code> are still mutable. Using the <code>const</code> declaration only prevents reassignment of the variable identifier.</p><p><pre><code class="language-js">const s = [5, 6, 7];
 s = [1, 2, 3]; // throws error, trying to assign a const
 s[2] = 45; // works just as it would with an array declared with var or let
 console.log(s); // returns [5, 6, 45]
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>An array is declared as <code>const s = [5, 7, 2]</code>. Change the array to <code>[2, 5, 7]</code> using various element assignment.</p></section>
\ No newline at end of file
+<p>An array is declared as <code>const s = [5, 7, 2]</code>. Change the array to <code>[2, 5, 7]</code> using various element assignments.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -4,5 +4,4 @@
 });
 </code></pre></p>
 <p><code>error</code> is the argument passed in to the <code>reject</code> method.</p>
-<p><strong>Note:</strong> the <code>then</code> and <code>catch</code> methods can be chained to the promise declaration if you choose.</p>
 </section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,6 +1,5 @@
 <section id="description">
-<p>The keyword <code>let</code> is not the only new way to declare variables. In ES6, you can also declare variables using the <code>const</code> keyword.</p><p><code>const</code> has all the awesome features that <code>let</code> has, with the added bonus that variables declared using <code>const</code> are read-only. They are a constant value, which means that once a variable is assigned with <code>const</code>, it cannot be reassigned.</p><p><pre><code class="language-js">"use strict";
-const FAV_PET = "Cats";
+<p>The keyword <code>let</code> is not the only new way to declare variables. In ES6, you can also declare variables using the <code>const</code> keyword.</p><p><code>const</code> has all the awesome features that <code>let</code> has, with the added bonus that variables declared using <code>const</code> are read-only. They are a constant value, which means that once a variable is assigned with <code>const</code>, it cannot be reassigned.</p><p><pre><code class="language-js">const FAV_PET = "Cats";
 FAV_PET = "Dogs"; // returns error
 </code></pre></p>
 <p>As you can see, trying to reassign a variable declared with <code>const</code> will throw an error. You should always name variables you don't want to reassign using the <code>const</code> keyword. This helps when you accidentally attempt to reassign a variable that is meant to stay constant. A common practice when naming constants is to use all uppercase letters, with words separated by an underscore.</p>

Show/Hide sections with changes/issues
  • Description section has changed
@@ -14,5 +14,5 @@
 <p>When there is no function body, and only a return value, arrow function syntax allows you to omit the keyword <code>return</code> as well as the brackets surrounding the code. This helps simplify smaller functions into one-line statements:</p>
 <p><pre><code class="language-js">const myFunc = () => "value";
 </code></pre></p>
-<p>This code will still return <code>value</code> by default.</p>
+<p>This code will still return the string <code>value</code> by default.</p>
 </section>
\ No newline at end of file
  • Instructions section has changed
@@ -1,2 +1,2 @@
 <section id="instructions">
-<p>Rewrite the function assigned to the variable <code>magic</code> which returns a new <code>Date()</code> to use arrow function syntax. Also make sure nothing is defined using the keyword <code>var</code>.</p></section>
\ No newline at end of file
+<p>Rewrite the function assigned to the variable <code>magic</code> which returns a <code>new Date()</code> to use arrow function syntax. Also, make sure nothing is defined using the keyword <code>var</code>.</p></section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Number of tests do not match - English: 4 | Chinese: 3
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -1,13 +1,15 @@
 <section id="description">
 <p>Just like a regular function, you can pass arguments into an arrow function.</p><p><pre><code class="language-js">// doubles input value and returns it
 const doubler = (item) => item * 2;
+doubler(4); // returns 8
 </code></pre></p>
-<p>If an arrow function has a single argument, the parentheses enclosing the argument may be omitted.</p>
-<p><pre><code class="language-js">// the same function, without the argument parentheses
+<p>If an arrow function has a single parameter, the parentheses enclosing the parameter may be omitted.</p>
+<p><pre><code class="language-js">// the same function, without the parameter parentheses
 const doubler = item => item * 2;
 </code></pre></p>
 <p>It is possible to pass more than one argument into an arrow function.</p>
 <p><pre><code class="language-js">// multiplies the first input value by the second and returns it
 const multiplier = (item, multi) => item * multi;
+multiplier(4, 2); // returns 8
 </code></pre></p>
 </section>
\ No newline at end of file
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 3
    Version Text
    Old
      <code>myConcat</code> should be a function.
    
    New
      `myConcat` should be an arrow function with two parameters
    
    

Show/Hide sections with changes/issues
  • Description section has changed
@@ -10,6 +10,5 @@
   /* do something with these fields */
 }
 </code></pre></p>
-<p>This removes some extra lines and makes our code look neat.
-This has the added benefit of not having to manipulate an entire object in a function — only the fields that are needed are copied inside the function.</p>
+<p>When <code>profileData</code> is passed to the above function, the values are destructured from the function parameter for use within the function.</p>
 </section>
\ No newline at end of file

Show/Hide sections with changes/issues
  • Description section has changed
@@ -34,8 +34,7 @@ console.log(printNumTwo());
 // returns 3
 </code></pre></p>
 <p>As you can see, <code>printNumTwo()</code> prints 3 and not 2. This is because the value assigned to <code>i</code> was updated and the <code>printNumTwo()</code> returns the global <code>i</code> and not the value <code>i</code> had when the function was created in the for loop. The <code>let</code> keyword does not follow this behavior:</p>
-<p><pre><code class="language-js">'use strict';
-let printNumTwo;
+<p><pre><code class="language-js">let printNumTwo;
 for (let i = 0; i &#x3C; 3; i++) {
   if (i === 2) {
     printNumTwo = function() {

Show/Hide sections with changes/issues
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 1
    Version Text
    Old
      <code>resolve</code> should be executed when the <code>if</code> condition is <code>true</code>.
    
    New
      `resolve` should be called with the expected string when the `if` condition is `true`.
    
    

    Test 2

    Version Text
    Old
      <code>reject</code> should be executed when the <code>if</code> condition is <code>false</code>.
    
    New
      `reject` should be called with the expected string when the `if` condition is `false`.
    
    

Show/Hide sections with changes/issues
  • Instructions section has changed
@@ -1,3 +1,9 @@
 <section id="instructions">
-<p>Use template literal syntax with backticks to display each entry of the <code>result</code> object's <code>failure</code> array. Each entry should be wrapped inside an <code>li</code> element with the class attribute <code>text-warning</code>, and listed within the <code>resultDisplayArray</code>.</p>
-<p>Use an iterator method (any kind of loop) to get the desired output.</p></section>
\ No newline at end of file
+<p>Use template literal syntax with backticks to create an array of list element (<code>li</code>) strings. Each list element's text should be one of the array elements from the <code>failure</code> property on the <code>result</code> object and have a <code>class</code> attribute with the value <code>text-warning</code>. The <code>makeList</code> function should return the array of list item strings.</p>
+<p>Use an iterator method (any kind of loop) to get the desired output (shown below).</p><p><pre><code class="language-js">[
+  '&#x3C;li class="text-warning">no-var&#x3C;/li>',
+  '&#x3C;li class="text-warning">var-on-top&#x3C;/li>',
+  '&#x3C;li class="text-warning">linebreak&#x3C;/li>'
+]
+</code></pre></p>
+</section>
\ No newline at end of file
  • The following test(s) text do not match:
    Instructions: Make sure to also check that the English tests have not been reorderd.
    Test 1
    Version Text
    Old
      <code>resultDisplayArray</code> should be an array containing <code>result failure</code> messages.
    
    New
      `failuresList` should be an array containing `result failure` messages.
    
    

    Test 2

    Version Text
    Old
      <code>resultDisplayArray</code> should be equal to the specified output.
    
    New
      `failuresList` should be equal to the specified output.
    
    

Show/Hide sections with changes/issues
  • Number of tests do not match - English: 4 | Chinese: 3
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -4,6 +4,6 @@
 console.log(a, b); // 1, 2
 console.log(arr); // [3, 4, 5, 7]
 </code></pre></p>
-<p>Variables <code>a</code> and <code>b</code> take the first and second values from the array. After that, because of rest parameter's presence, <code>arr</code> gets rest of the values in the form of an array.
-The rest element only works correctly as the last variable in the list. As in, you cannot use the rest parameter to catch a subarray that leaves out last element of the original array.</p>
+<p>Variables <code>a</code> and <code>b</code> take the first and second values from the array. After that, because of the rest parameter's presence, <code>arr</code> gets the rest of the values in the form of an array.
+The rest element only works correctly as the last variable in the list. As in, you cannot use the rest parameter to catch a subarray that leaves out the last element of the original array.</p>
 </section>
\ No newline at end of file
  • Number of tests do not match - English: 4 | Chinese: 3
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Show/Hide sections with changes/issues
  • Description section has changed
@@ -16,10 +16,10 @@
     this._author = updatedAuthor;
   }
 }
-const lol = new Book('anonymous');
-console.log(lol.writer);  // anonymous
-lol.writer = 'wut';
-console.log(lol.writer);  // wut
+const novel = new Book('anonymous');
+console.log(novel.writer);  // anonymous
+novel.writer = 'newAuthor';
+console.log(novel.writer);  // newAuthor
 </code></pre></p>
 <p>Notice the syntax used to invoke the getter and setter. They do not even look like functions.
 Getters and setters are important because they hide internal implementation details.
  • Instructions section has changed
@@ -1,6 +1,6 @@
 <section id="instructions">
 <p>Use the <code>class</code> keyword to create a Thermostat class. The constructor accepts a Fahrenheit temperature.</p>
-<p>Now create a <code>getter</code> and a <code>setter</code> in the class, to obtain the temperature in Celsius.</p>
+<p>In the class, create a <code>getter</code> to obtain the temperature in Celsius and a <code>setter</code> to set the temperature in Celsius.</p>
 <p>Remember that <code>C = 5/9 * (F - 32)</code> and <code>F = C * 9.0 / 5 + 32</code>, where <code>F</code> is the value of temperature in Fahrenheit, and <code>C</code> is the value of the same temperature in Celsius.</p><p><strong>Note:</strong> When you implement this, you will track the temperature inside the class in one scale, either Fahrenheit or Celsius.</p>
 <p>This is the power of a getter and a setter. You are creating an API for another user, who can get the correct result regardless of which one you track.</p>
 <p>In other words, you are abstracting implementation details from the user.</p></section>
\ No newline at end of file
  • Number of tests do not match - English: 7 | Chinese: 6
    Instructions: Add or delete the applicable tests. It is possible some tests have been rearranged, so make sure each English test has a corresponding Chinese test in the same order

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions