JSFiddle - React, Tailwind, and code Playground

JavaScript

async function fetchUsers(url) {
  const response = await fetch(url);
  const json = await response.json();
  const listOfusernames = json.map(user => user.username);

  console.log(listOfusernames);
}

fetchUsers('https://jsonplaceholder.typicode.com/users');