Iterators
In this course, you will learn how to use iterator methods to simplify the process of looping over arrays.
StartKey Concepts
Review core concepts you need to learn to master this subject
Functions Assigned to Variables
Callback Functions
Higher-Order Functions
Array Method .reduce()
Array Method .forEach()
Array Method .filter()
Array Method .map()
Functions Assigned to Variables
Functions Assigned to Variables
let plusFive = (number) => {
return number + 5;
};
// f is assigned the value of plusFive
let f = plusFive;
plusFive(3); // 8
// Since f has a function value, it can be invoked.
f(9); // 14
In JavaScript, functions are a data type just as strings, numbers, and arrays are data types. Therefore, functions can be assigned as values to variables, but are different from all other data types because they can be invoked.
Higher-Order Functions
Lesson 1 of 2
- 1We are often unaware of the number of assumptions we make when we communicate with other people in our native languages. If we told you to “count to three,” we would expect you to say or think the …
- 2JavaScript functions behave like any other data type in the language; we can assign functions to variables, and we can reassign them to new variables. Below, we have an annoyingly long function n…
- 3Since functions can behave like any other type of data in JavaScript, it might not surprise you to learn that we can also pass functions (into other functions) as parameters. A _higher-order functi…
What you'll create
Portfolio projects that showcase your new skills
How you'll master it
Stress-test your knowledge with quizzes that help commit syntax to memory