Fixes 'd[0].toLowerCase() is not a function' error
This commit is contained in:
@ -638,7 +638,7 @@
|
||||
"Let's take the code we had last time and <code>unshift</code>this value to the start: <code>\"Paul\" </code>"
|
||||
],
|
||||
"tests": [
|
||||
"assert((function(d){if(d[0].toLowerCase() == 'paul' && d[1] == 23 && d[2][0] != undefined && d[2][0] == 'dog' && d[2][1] != undefined && d[2][1] == 3){return true;}else{return false;}})(myArray), 'myArray should now have [\"Paul\", 23, [\"dog\", 3]])');"
|
||||
"assert((function(d){if(typeof(d[0]) === \"string\" && d[0].toLowerCase() == 'paul' && d[1] == 23 && d[2][0] != undefined && d[2][0] == 'dog' && d[2][1] != undefined && d[2][1] == 3){return true;}else{return false;}})(myArray), '<code>myArray</code> should now have [\"Paul\", 23, [\"dog\", 3]]).');"
|
||||
],
|
||||
"challengeSeed": [
|
||||
"var ourArray = [\"Stimpson\", \"J\", [\"cat\"]];",
|
||||
|
Reference in New Issue
Block a user