[id='using-async-await_{context}']
= Using Async and Await constructs

Examples above can be greatly simplified taking advantage of `async` / `await` constructs,
which are available in Node.js since version `7.10.0`.

This section shows how some of the examples above can be written using `async` / `await`:

[discrete]
== Working with single entries and statistics

[source,javascript,options="nowrap",subs=attributes+]
----
include::code_examples/await-single-entries.js[]
----

[discrete]
== Working with multiple entries

[source,javascript,options="nowrap",subs=attributes+]
----
include::code_examples/await-multiple-entries.js[]
----
