fetch('https://randomuser.me/api?results=2') .then(response => { return response.json(); }) .then(data => console.log(data));