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.
pull/18182/head
dcsmith926 2015-11-25 18:38:19 -05:00
parent a1d7cfca57
commit 06e406c68c
1 changed files with 2 additions and 2 deletions

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'>\"",
"",