mirror of
https://github.com/alrayyes/wiki.git
synced 2024-11-22 11:36:23 +00:00
18 lines
310 B
Markdown
18 lines
310 B
Markdown
---
|
|
date: 2020-11-11
|
|
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 */ });
|
|
```
|