below is the codepen link please check and tell me how i can display the score of the correct answer. i tried a lot of methods to do it but no one works.
https://codepen.io/zafarhussain633/pen/WNGvYMb
I’d modify the quizload function, so that it adds a value attribute to the inputs to indicate which is the correct answer.
You can then modify the submitButton callback so that it checks whether the answer was correct or not.
I would also suggest you check out the FormData API, which can be pretty handy when working with forms.