Merge pull request #4460 from vitolob/patch-1

Bonfire: Mutation - Change MDN Link from Array.indexOf to String.indexOf.
This commit is contained in:
Rex Schrader
2015-11-15 14:28:04 -08:00

View File

@ -547,7 +547,7 @@
"assert(mutation([\"hello\", \"neo\"]) === false, 'message: <code>mutation([\"hello\", \"neo\"])</code> should return false.');"
],
"MDNlinks": [
"Array.indexOf()"
"String.indexOf()"
],
"solutions": [
"function mutation(arr) {\n var hash = Object.create(null);\n arr[0].toLowerCase().split('').forEach(function(c) {\n hash[c] = true;\n });\n return !arr[1].toLowerCase().split('').filter(function(c) {\n return !hash[c];\n }).length;\n}\n\nmutation(['hello', 'hey']);\n"