beginner40 minby DevFox

Functions as values: callbacks and function types

Hand a function over without calling it: keep it in a box, give your own named function to filter, and write a function that takes one and calls it back. See countIf call isCall once for every task, read a function type such as (task: string) => boolean, and learn what TypeScript says when a callback is called instead of handed over.

  • TypeScript
  • Fundamentals
Functions as values: callbacks and function types. Read this lesson at .