Skip to content

Commit 0f1167c

Browse files
committed
Merge branch 'fix-getting-started' of github.com:meilisearch/meilisearch-js into fix-getting-started
2 parents 6ebde23 + 727ee06 commit 0f1167c

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

README.md

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,16 +110,15 @@ You can check out [the API documentation](https://docs.meilisearch.com/reference
110110

111111
Go checkout [examples](./examples)!
112112

113-
In this section, the examples contain the [`await` keyword](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await). This operator is used to wait for a `Promise`.<br>
114-
Despite it is not detailled in the examples above, it can only be used inside an `async` function.
113+
In this section, the examples contain the [`await` keyword](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/await).
115114

116115
### Indexes
117116

118117
#### Create an index <!-- omit in toc -->
119118

120119
```javascript
121120
// Create an index
122-
const index = await client.createIndex({ uid: 'books' })
121+
await client.createIndex({ uid: 'books' })
123122
// Create an index and give the primary-key
124123
const index = await client.createIndex({ uid: 'books', primaryKey: 'book_id' })
125124
```

0 commit comments

Comments
 (0)