A higher-order function is a function that can take at least one or more functions as arguments, or returns a function as its result. const names = ['Leonardo_Dinosaur', 'Cheerful_Candytree', 'Reindeer_Fairyfluff'] const removeUnderscore = names.map((name) => {
return name.replace('_', ' ')
}) // ['Leonardo Dinosaur', 'Cheerful Candytree', 'Reindeer Fairyfluff'] The map method is a HOF that accept a callback (anonymous function).