In asynchronous programming, closures allow a function to retain access to variables from an outer function even when it executes at some later time.