No feedback. Instead I am learning a lot from your code.
@prem-kumart
Posted
@Hexerse Thank you! but this is an ad-hoc version that I made. Naming is not consistent. I have used async/await and went on from there Used "Promises" to wait for an action and resolved accordingly. Creating dynamic elements and inserting them as needed.
Please do reply if you found another way of doing it or anything to improve my code.
@prem-kumart to be honest i am exploring async await. I was wondering if you put the fetch into a function or put fetch into a function and await it. Then you wouldn’t need to put await on so many functions? I have no time to test it now but its an idea maybe you could try ?
async function fetchData (url) { try { const response = await fetch(url);
const json = await response.json();
console.log(json);
} catch (error) {
console.error(Error : ${error}
);
}
}
@prem-kumart
Posted
@Hexerse I looked into it this way. I have a series of await functions
- Loading the Welcome Page ( wait for the response - selecting the subject ) ---->then 2. Each Question ( wait for the response - answer) -> 3. Final Score ( wait for the response ) ---- repeat the process
@prem-kumart I see, have you tried posting into the discord channels ? I think they can help a lor more