How to run async/await in the browser?

Is there a relatively easy way to implement this design in the browser?

getMovieAsync async function() {
 let response = await fetch(' Matrix');
 let movie = await response.json();


Passed through Babel (es2015, stage-3), got the code for Node.js
July 9th 19 at 13:23
1 answer
July 9th 19 at 13:25
In what sense is code for Node.js?

You can rewrite this function using Promise

getMovieAsync function() { 
 fetch(' Matrix')
 .then(response => response.json())
 .then(data => { console.log(data.Title) });

code modules var x= require('x') - Josiane3 commented on July 9th 19 at 13:28

Find more questions by tags JavaScript