wiki/content/20201111095316-javascript_consuming_promises.md

19 lines
310 B
Markdown
Raw Normal View History

2024-05-06 20:40:05 +00:00
---
2024-10-29 18:27:12 +00:00
date: 2020-11-11
2024-05-06 20:40:05 +00:00
id: 5280d3db-1858-4b6c-82d7-6a5d5bf5d5c6
title: JavaScript Consuming Promises
---
# Advice
Use [Async functions](20201026103714-javascript_async_functions) instead
of this.
# Syntax
``` javascript
promise
.then(value => { /* fulfillment */ })
.catch(error => { /* rejection */ });
```