How to async await in JavaScript

Promise
Last updated Feb 03, 2019
(async () => {
    try {
       const response = await fetch("https://codetogo.io/api/users.json");
       const data = await response.json();
       console.log(data);
    } catch(err){
       console.error(err);
    }
})();
[{
    id: 1,
    name: "Jad"
}, {
    id: 2,
    name: "Nicole"
}]