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
parent
a1d7cfca57
commit
06e406c68c
|
@ -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'>\"",
|
||||
"",
|
||||
|
|
Loading…
Reference in New Issue