I am new to JS and I want to get the response of the fetch outside of the function.
const url = '/api/quiz/attempt/questions/?quiz_uid={{quiz.quiz_id}}';
async function getQuestions(url) {
const response = await fetch(url);
var data = await response.json();
return data;
}
const Questions = getQuestions(url);