Trying to get familiar with async/await, I\'ve tried the following code in Chrome:
async/await
async function f() { return await $.get(\'/\'); }; va
either
function f() { return $.get('/'); }; async test() { var x = await f() console.log(x) } test()
or
f().then(function(res) { console.log(res) }
the async/await is just another way to write the same logic.