FAQ: Higher-Order Functions - Functions as Parameters


Yeah I felt quite comfortable up to this point but it felt like my learning curve turned into a near-vertical wall. I can’t help but wonder if this could have been aided with a more practical real-world application, otherwise it risks being clouded by abstraction.


hey, I wrote for number 2:

const checkConsistentOutput = (funk, val) => {
if (funk(val) === funk(val)) {
return funk(val);
} else if (funk(val) != funk(val)){
return “This function returned inconsistent results.”

would the function “funk” evaluate twice in this context?