async function yourFunction() { //Most compact way to return a fetch
const response = await fetch('some-url', {});
const json = await response.json();
return json; //do here wathever with your json if you want to return
} //a specific part of it.
yourFunction().then(resp => {
console.log(resp); //Here you get the function response and print it
});