Challenge write-higher-order-arrow-functions has an issue.
User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/58.0.3029.110 Safari/537.36
.
Please describe how to reproduce this issue, and include links to screenshots if possible.
The challenges with map(), filter(), and reduce(), have not been taught yet, in this order.
const realNumberArray = [4, 5.6, -9.8, 3.14, 42, 6, 8.34];
// change code below this line
var squaredIntegers = realNumberArray;
// change code above this line
// test your code
console.log(squaredIntegers);
Related to #13810 We can't test es6 challenges for now.
@ooade - I think what @spieg is saying is that at this juncture, with the current order of the challenges, letting alone that many of the other ES6 challenges do not have test cases, is that the concepts for the array methods that are mentioned here have not yet been covered. So far as I can tell, we no longer have basic introductory challenges for filter()
, map()
, and reduce()
. These are now introduced in the functional programming section, but are used in other challenges leading up to that. I think having basic intros to these concepts would be a good idea, earlier on in the curriculum.
I totally agree with you @no-stack-dub-sack
I think this issue should not be deferred and should be removed from the beta curriculum entirely, or added to the curriculum in a later section after filter()
, map()
, and reduce()
have been introduced.
Another option is to explain filter()
, map()
, and reduce()
prior to this challenge. However, that may be beyond the scope of this issue.
Is the student supposed to use filter()
, map()
, and reduce()
in the challenge solution? If so, that's strange because as @spieg points out, the student hasn't learned how to use these yet. If not, why mention them at this point in the curriculum? Someone new to JavaScript probably won't see the value of arrow functions from this example.
At this point in the curriculum, one is learning about arrow functions. From a student's perspective, it's not clear at this stage why one would want to use an arrow function over other function syntax. Adding filter()
, map()
, and reduce()
functions to the mix makes this challenge (and arrow functions) more confusing.
I think the previous challenges on arrow functions (ES6: Use Arrow Functions to Write Concise Anonymous Functions and ES6: Write Arrow Functions with Parameters) are sufficient at this stage in the curriculum.
@no-stack-dub-sack this challenge is now live on https://learn.freecodecamp.org - would you be interested in making the fix (moving it, or writing a few quick challenges that introduce these functional JavaScript features prior to the functional programming section?)
@QuincyLarson I think I came up with a solution (PR #35954) which hopefully allows us to close this issue once and for all.
Most helpful comment
@ooade - I think what @spieg is saying is that at this juncture, with the current order of the challenges, letting alone that many of the other ES6 challenges do not have test cases, is that the concepts for the array methods that are mentioned here have not yet been covered. So far as I can tell, we no longer have basic introductory challenges for
filter()
,map()
, andreduce()
. These are now introduced in the functional programming section, but are used in other challenges leading up to that. I think having basic intros to these concepts would be a good idea, earlier on in the curriculum.