Open lol-linux opened 1 month ago
When the script reaches the point where it detects data.code === 250 fetch the qcm endpoint and create a form on the page with all responses decoded from base 64.
In .then(serverResponse)
callback function after fetch :
let question = serverResponse.data.question;
let reponses = [];
serverResponse.data.propositions.forEach(proposition => {
reponses.push(atob(proposition))
})
//Create a <form> element with all datas
I would like to know how I can modify my code so that it displays the QCM and allows me to respond. Thank you in advance.
`
<!DOCTYPE html>
`