ES6 course's unfamiliar methods

i finished the “Basic Javascript” course and headed onto ES6 course but there are a lot of methods and functions which are used in this course that I’m not quiet familiar with. should I have started another course before ES6 or this is how it’s supposed to be?

i mean it seems like the course expects me to know what map and reduce and these kinds of methods are.
but these were never discussed in the previous course

i would just look up the things that are new to you as you’re going through the course in order. i think there are just a few examples like the one you highlight.
maybe use

for things like .map, .filter.

1 Like

The only challenge in the ES6 section that mentions map, filter or reduce is Use the Rest Parameter with Function Parameters. Though the challenge does not really require you to understand how reduce works in the code, I agree the challenge would be just as useful if a for loop would have been used and the following sentence removed:

The rest parameter eliminates the need to check the args array and allows us to apply map() , filter() and reduce() on the parameters array.

The initial code could look like:

const sum = (x, y, z) => {
  const args = [x, y, z];
  let finalSum = 0;
  for (let num of args) {
    finalSum += num;
  }
  return finalSum;
}

These methods are covered in the Functional Programming section presented later in the curriculum, so throwing them in this section is a bit premature.

1 Like

Helpful!
Thank you very much.
<3

i don’t mind looking up, i was just curios if the ES6 was added later than the others and that’s why it contains some stuff i haven’t learned throughout the last course.

Valid point, there are called “JavaScript Higher Order Functions”. Google “javascript hof” to learn more and also search in YT as well.

Last year when I learnt these; I didn’t get them until I started using them in Exercism, I suggest once you’re done learning JS in FCC; goto Frontend Mentor | Challenges and start building projects; that way you will cement concepts learnt in FCC

For now don’t worry about reduce HOF; it’s hard at first, just concentrate on map, filter as they are mostly used

Very helpful, thank you! this website seems pretty great :+1:

1 Like

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.