Experimental async/await support in Node 7. Let’s start with a simple example. Say we want to create a function that requests an URL and tells us the status code. Using ES6 promises this is what the code might look like: With async/await we can simplify the function a bit. Instead of calling we can rewrite it as a async function and await for the request to be resolved. getStatus .then() It will wait for the promise to resolve in a way. However, when trying to run this with you will get an error. non-blocking node async-await-example async function getStatus (url) {^^^^^^^^SyntaxError: Unexpected token function The good news is that async/await has landed in v8 of the engine, which is implemented in Node 7. Async/await is added as a experimental feature and can be used with the flag . JavaScript --harmony-async-await Start using async/await today by and running it with: installing Node 7 $ node --harmony-async-await is how hackers start their afternoons. We’re a part of the family. We are now and happy to opportunities. Hacker Noon @AMI accepting submissions discuss advertising &sponsorship To learn more, , , or simply, read our about page like/message us on Facebook tweet/DM @HackerNoon. If you enjoyed this story, we recommend reading our and . Until next time, don’t take the realities of the world for granted! latest tech stories trending tech stories