use of ".map()" should be ".forEach()"

In "seed/challenges/json-apis-and-ajax.json", the use of ".map()" in the 5th and 6th challenges doesn't make sense -- we're not creating a new array by modifying each element of the response, and in challenge 4, the learner was told to use ".forEach()". Seeing ".map()" instead for no apparent reason would likely be a source of confusion.
This commit is contained in:
dcsmith926
2015-11-25 18:38:19 -05:00
parent 1fc4677eb1
commit 1584485739

View File

@@ -239,7 +239,7 @@
"",
" var html = \"\";",
"",
" json.map(function(val) {",
" json.forEach(function(val) {",
"",
" html += \"<div class = 'cat'>\";",
"",
@@ -310,7 +310,7 @@
" ",
" // Only change code above this line.",
"",
" json.map(function(val){",
" json.forEach(function(val) {",
"",
" html += \"<div class = 'cat'>\"",
"",