aboutsummaryrefslogtreecommitdiffstats
path: root/packages/website/md/docs/0xjs/async.md
diff options
context:
space:
mode:
Diffstat (limited to 'packages/website/md/docs/0xjs/async.md')
-rw-r--r--packages/website/md/docs/0xjs/async.md9
1 files changed, 6 insertions, 3 deletions
diff --git a/packages/website/md/docs/0xjs/async.md b/packages/website/md/docs/0xjs/async.md
index 63924c76c..8abaef331 100644
--- a/packages/website/md/docs/0xjs/async.md
+++ b/packages/website/md/docs/0xjs/async.md
@@ -1,6 +1,7 @@
0x.js is a promise-based library. This means that whenever an asynchronous call is required, the library method will return a native Javascript promise. You can therefore choose between using `promise` or `async/await` syntax when calling our async methods.
-*Async/await syntax (recommended):*
+_Async/await syntax (recommended):_
+
```javascript
try {
var availableAddresses = await zeroEx.getAvailableAddressesAsync();
@@ -9,9 +10,11 @@ try {
}
```
-*Promise syntax:*
+_Promise syntax:_
+
```javascript
-zeroEx.getAvailableAddressesAsync()
+zeroEx
+ .getAvailableAddressesAsync()
.then(function(availableAddresses) {
console.log(availableAddresses);
})