I'm trying to get all users from api and I need to find the user which most get paid.
so for example
let users=['tom','jenny','smith','Joe']
async function getUsers() {
let response = await fetch(`http://something.something?q=${users}`);
let data = await response.json();
return data;
}
getUsers().then(data =>console.log(data))
so my plan is users[0],users[1] something like a make function which I add index number via loop.
and get all users and find out who get the most paid.
so my question is how can do fetch users step by step.