(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: "Sam"
}, {
id: 2,
name: "Alex"
}]