Merge branch 'staging' of github.com:FreeCodeCamp/freecodecamp into staging
This commit is contained in:
@ -513,7 +513,7 @@
|
||||
],
|
||||
"tests":[
|
||||
"assert((function(){if(typeof(myArray) != 'undefined' && myArray[0] == 3 && myArray[1] == 2 && myArray[2] == 3){return(true);}else{return(false);}})(), 'myArray should now be [3,2,3]');",
|
||||
"assert((function(){if(editor.getValue().match(/[0]/g).length >= 2 && editor.getValue().match(/=/g).length >= 2){return(true);}else{return(false);}})(), 'You should be using indexes to modify the values in myArray');"
|
||||
"assert((function(){if(editor.getValue().match(/[0]/g).length >= 1 && editor.getValue().match(/=/g).length >= 2){return(true);}else{return(false);}})(), 'You should be using indexes to modify the values in myArray');"
|
||||
],
|
||||
"challengeSeed":[
|
||||
"var ourArray = [1,2,3];",
|
||||
|
@ -227,7 +227,7 @@
|
||||
"difficulty":0,
|
||||
"description":[
|
||||
"filter is a useful method that can filter out values that don't match a certain criteria",
|
||||
"Let's remove all the values less than six",
|
||||
"Let's remove all the values greater than six",
|
||||
"<code>array = array.filter(function(val) {</code>",
|
||||
"<code>  return(val<4);</code>",
|
||||
"<code>});</code>"
|
||||
@ -235,7 +235,7 @@
|
||||
"tests":[
|
||||
"assert.deepEqual(array, [1,2,3,4,5], 'You should have removed all the values from the array that are less than six');",
|
||||
"assert(editor.getValue().match(/array\\.filter\\(/gi), 'You should be using the filter method to remove the values from the array');",
|
||||
"assert(editor.getValue().match(/\\[1\\,2\\,3\\,4\\,5\\,6\\,7\\,8\\,9\\,10\\]/gi), 'You should only be using .filter to modify the contents of the array);"
|
||||
"assert(editor.getValue().match(/\\[1\\,2\\,3\\,4\\,5\\,6\\,7\\,8\\,9\\,10\\]/gi), 'You should only be using .filter to modify the contents of the array');"
|
||||
],
|
||||
"challengeSeed":[
|
||||
"var array = [1,2,3,4,5,6,7,8,9,10];",
|
||||
|
Reference in New Issue
Block a user