Amazing work we can navigate the next question we can check for correct answer, and I think at this
point I would want to implement my model.
So once we get to the end of questions, I would want to display a that showcase as well, how many
questions we got correctly instead of looping through our questions.
And then at the end, of course, we go back to the question number one, and we're going to start by
setting up two functions.
We're going to have one for opening the model and the second one, of course, for closing the model.
So here comes open and the model is equal.
So that's my function here.
And sort of this function will have very straightforward functionality, set his model open and that
one will be equal to true.
So set is model open and I'll set it equal to try and remember.
And the next question function.
We had functionality to open up the model.
Now of course our will on Commandeers and we should open up the model once we get to the end of.
All right.
OK, good.
And then also I'd want to set up a function for closing the model.
So close model.
And yes, of course will have set is model open and that one will be equal to false.
So that is model to open false.
So of course we'll close the model.
But I also would want to do two things set waiting.
I would want to have it as true.
Why?
Well, again, we go back to the complete one notice, once I get to the end, of course, I will display
my model.
But when I close the model, when I click on play again, I would want to go back to the setup form.
And that's why I'm here.
All set.
Set.
Wearing the true as well as that correct should also be zero since I would want to start from scratch.
Navigate down to the value and we only want to pass in close model because open model will invoke it
here in next question.
There is no other place in the application that is looking for function.
And now of course I would want to navigate armchairs.
We will on comment model and then of course we need to go here as well.
And instead of the model component, I would want to start by invoking the EU's global context.
So within the function body, not just the structure is more open.
So check whether the model is open, will grab our close model function.
And also since in the model our one on display, what is the percentage of correct answers?
I would like to get the correct value.
So how many questions I got correct and the questions right.
And all that is coming from of course, use global context and then we invoke it.
Then we're going to set up our live here so say there.
And when it comes to the model content, I would want to set up the temporary operator where we have
a class name and then depending whether the model is open, will either add class or so.
And here we go with template string and then we'll set up our expression where we go with Eres Model
open.
So if that is true, then of course the classes that I would want to add to my model are model container
and is open class.
And if you want to take a look, just navigate the success and you'll see both of these classes.
And if the model is not open, then of course there's just going to be a modal container and line instead
of this div, we're going to go with the div with a class of modal online content.
And for the time being, let's just go and tell.
I want to say congrats like so on.
Add here a exclamation point.
And of course I cannot see the model because I'm not at the end of the array and at the moment is model
open.
Of course it is false.
That's why I only have model container.
But once I get to the end of my questions, are I.
Of course I should see them all correct.
Now let me answer at least one question correctly and then check it out.
Now, of course at the end of my questions.
Alright, so I'm done with all the questions and I'm displaying my model.
I have congrats.
And then inside of this model.
We're going to go with some kind of text you answered, and then I would want to check, well, what
is the percentage of my questions?
So how many questions I answered correctly.
And let me just add that first, I'm going to set off questions, questions and correctly so online.
There's going to be a button to play again as well.
So let's go with button one class name, and that one will be close and close, hyphen METI.
And and then instead of this button, let's just say play again.
And when it comes to your functionality, I'm going to go with oncolytic and we're going to go with
our function, the clothes model function, and again, we can either answer all the questions correctly,
which is going to be my case, or we can just go to the next question.
And once we're done with all the questions we should see tomorrow where we have congrats.
You answered.
And of course, we just need to set up the functionality where we calculate, well, how many questions
we answered correctly.
And the way we'll check that is by then going back to the JavaScript, setting up our expression, and
we're just going to divide correct answers by the questions length and then multiply that by 100 so
that he is going to give us the percentage.
Now, I need to have two sets of parentheses.
So we're going to go here with correct divided by questions, questions and then length.
So I'm dividing by the length of my.
And then if I want a half percentage, I right away I want to multiply by a hundred here.
Now I also need Dot and then say to fix and I'm just going to go with a zero just so I don't have too
many numbers after that.
So again, I'm going to go with some questions correctly and then I'll miss you and then check it out.
I have.
Congrats.
You answered 60 and then of course, I'm just missing your percentage.
Here, OK, so, yep, I have 60 percent of questions correctly, so that should do it.
We can move on to the next question.
We can try to answer the question.
At the very end, we'll display the model, which will display how many questions we've got correctly.
And then once we close the model, we should go back to our original setup where we're displaying the
support.
So let's test that out one last time.
We're going to get some questions correct and then I'll make sure that I missed you and the nurse we
have.
Congrats.
You answered 70 percent of questions correctly, and now we go with play again.
And there is now, of course, we have the setup for.