Merge pull request #6888 from raisedadead/fix/filter-arrays-with-filter
Fix the instructions in the Filter Array Challenge
This commit is contained in:
@ -390,7 +390,7 @@
|
|||||||
"The following code is an example of using <code>filter</code> to remove array elements that are equal to five:",
|
"The following code is an example of using <code>filter</code> to remove array elements that are equal to five:",
|
||||||
"Note: We omit the second and third arguments since we only need the value",
|
"Note: We omit the second and third arguments since we only need the value",
|
||||||
"<blockquote>array = array.filter(function(val) {<br> return val !== 5;<br>});</blockquote>",
|
"<blockquote>array = array.filter(function(val) {<br> return val !== 5;<br>});</blockquote>",
|
||||||
"Use <code>filter</code> to filter out all elements from <code>oldArray</code> that are greater than 5 and store the results into <code>newArray</code>. <code>oldArray</code> should not change."
|
"Use <code>filter</code> to create a new array with all the values from <code>oldArray</code> which are less than 6.<br><code>oldArray</code> should not change."
|
||||||
],
|
],
|
||||||
"challengeSeed": [
|
"challengeSeed": [
|
||||||
"var oldArray = [1,2,3,4,5,6,7,8,9,10];",
|
"var oldArray = [1,2,3,4,5,6,7,8,9,10];",
|
||||||
|
Reference in New Issue
Block a user