Web platform features explorer

Promise.try()

Newly available since 2025-01-07
Tags: javascript Groups: JavaScript > Promises

The Promise.try() static method returns a promise that takes a callback of any kind (returns or throws, synchronously or asynchronously) and wraps its result in a Promise.

Learning resources on MDN

Browser support

Specifications