1
00:00:00,780 --> 00:00:05,910
Now will be creating and then my third intervention that is going to help us to submit our data.

2
00:00:06,150 --> 00:00:11,700
And that function is going to be passed to Abdul GSX so that we can start our quiz.

3
00:00:12,000 --> 00:00:13,710
So let's create the handle method.

4
00:00:14,710 --> 00:00:18,400
So right beneath the fetch method will be creating concert.

5
00:00:20,680 --> 00:00:21,400
Handles amid.

6
00:00:25,880 --> 00:00:29,780
No, this is going to be a narrow function that is going to take an event as an argument.

7
00:00:30,380 --> 00:00:36,650
Now since this is a method, we make sure that whenever this function is called browser and doesn't

8
00:00:37,250 --> 00:00:40,460
relaunch itself, so it should prevent default.

9
00:00:42,830 --> 00:00:45,020
All right, so we have saved it from the.

10
00:00:45,680 --> 00:00:51,740
Apart from it, we'll make sure that we'll be creating a constant and this content is going to be called

11
00:00:51,740 --> 00:00:52,320
as you are.

12
00:00:53,540 --> 00:00:56,840
So basically, this is the URL we want to go to.

13
00:00:58,860 --> 00:01:03,520
And this is going to be a template string because we'll be adding different variables to it.

14
00:01:03,540 --> 00:01:10,170
So put the backpacks and based the statement that has been brought to you inside of your documents,

15
00:01:10,470 --> 00:01:15,030
neither wondering what these amount difficulty as well as category.

16
00:01:16,050 --> 00:01:22,370
So if you might recall that when we made a state question, we already provided it with our default

17
00:01:22,380 --> 00:01:24,780
amount of Category four difficulty.

18
00:01:25,080 --> 00:01:29,630
And as for the table will be creating what they will know to contest tables.

19
00:01:30,060 --> 00:01:37,420
So basically, a table is a reference value that is going to define various number points for various

20
00:01:37,470 --> 00:01:47,400
drinks and sports has the point of 19, whereas our history has point or twenty three and a politics.

21
00:01:52,710 --> 00:01:54,210
What is the point of twenty four?

22
00:01:54,660 --> 00:01:56,400
So we have made our table as very.

23
00:01:57,510 --> 00:01:59,490
Now we need to this structure.

24
00:02:00,990 --> 00:02:03,700
Amount, difficulty, as well as a.

25
00:02:04,880 --> 00:02:08,240
Amount, difficulty and the category.

26
00:02:08,810 --> 00:02:15,260
So let's restructure them from Quest, so right beneath or even or prevent default, create a contest

27
00:02:15,260 --> 00:02:19,460
that is going to have the value amount as well as difficulty.

28
00:02:20,960 --> 00:02:26,740
As well as that category, now, this all is initialized to quiz, so we are restructuring under drama

29
00:02:26,750 --> 00:02:27,080
quiz.

30
00:02:27,770 --> 00:02:29,710
So now we have fetched are you all?

31
00:02:30,200 --> 00:02:34,520
Now we need to post a request to update you so that we can get our data.

32
00:02:35,030 --> 00:02:40,520
So fetch questions and this is going to have your role as a parameter.

33
00:02:41,780 --> 00:02:46,340
Now we need to make sure that fetch of questions also takes up a new order.

34
00:02:48,470 --> 00:02:52,700
Now, apart from this, you will be giving it the other that we are getting from a subject matter.

35
00:02:54,320 --> 00:02:55,060
So you are.

36
00:02:56,350 --> 00:03:02,200
All right, so now we have successfully created a fetch method as well as a hand as a method.

37
00:03:02,500 --> 00:03:08,110
Now they're going to create two a method one is going to be for opening our models as well as closing

38
00:03:08,110 --> 00:03:08,680
our models.

39
00:03:09,400 --> 00:03:10,840
So right beneath her.

40
00:03:12,000 --> 00:03:17,080
I right above your handles and let's create a contest and there's going to be for opening our borders

41
00:03:17,100 --> 00:03:18,120
or open.

42
00:03:19,460 --> 00:03:22,820
More now, this again, is another function.

43
00:03:25,910 --> 00:03:33,680
Now, if one clicks on open model, what we want to do that is that set model to true, that means said

44
00:03:33,680 --> 00:03:35,000
the model value equals true.

45
00:03:35,010 --> 00:03:36,800
That means our model is open, apart, apart.

46
00:03:37,040 --> 00:03:40,280
It will be creating another method that is going to close our model.

47
00:03:41,150 --> 00:03:43,370
So close model.

48
00:03:47,530 --> 00:03:48,970
This, again, is another function.

49
00:03:50,950 --> 00:03:52,480
And it will make sure that.

50
00:03:54,240 --> 00:03:57,270
SEC Modi is stone to false.

51
00:03:57,510 --> 00:04:03,840
That means flip a switch as a flip now and after setting it to and make sure that set waiting as a.

52
00:04:06,170 --> 00:04:06,830
Is true.

53
00:04:07,400 --> 00:04:15,890
And apart from celebrating set correct is that means you have refreshed state of the number of questions

54
00:04:15,890 --> 00:04:16,550
that are correct.

55
00:04:16,760 --> 00:04:18,590
So we have made these two methods.

56
00:04:19,100 --> 00:04:25,040
Now we have handled some open method, close model method as well as our fetch method.

57
00:04:25,310 --> 00:04:27,920
Now, apart from this, we'll be having two other methods.

58
00:04:27,920 --> 00:04:35,720
And if we just go outside, we will be also having methods to set our index as well as set correct that

59
00:04:35,730 --> 00:04:37,850
the number of questions that I correct in our answers.

60
00:04:38,510 --> 00:04:41,990
Now, just beneath your clothes model, we making these two methods.

61
00:04:45,210 --> 00:04:49,710
Now, researching another method that is the next question method, which is going to handle our data

62
00:04:50,700 --> 00:04:52,170
of search index and opening our model.

63
00:04:54,020 --> 00:04:54,800
So concert.

64
00:04:56,620 --> 00:04:57,550
Next question.

65
00:04:58,270 --> 00:05:05,140
So as the name suggests, the name is self-explanatory that it is going to be called on every next question

66
00:05:05,140 --> 00:05:07,120
and this again is going to be out function.

67
00:05:08,680 --> 00:05:11,440
And it is going to set our index right.

68
00:05:12,190 --> 00:05:14,680
And this is going to dig up all index as a parameter.

69
00:05:14,680 --> 00:05:16,570
So basically, it's taking our previous value.

70
00:05:18,200 --> 00:05:25,120
And this is going to make sure that our index that's critical and index that is going to be equal to

71
00:05:26,180 --> 00:05:29,140
all the next president of the increment, incriminating the order value by one.

72
00:05:29,840 --> 00:05:30,770
So now if?

73
00:05:32,780 --> 00:05:40,070
Well, index is greater than all index or length minus one.

74
00:05:40,820 --> 00:05:44,750
Then we want to make sure that our model is open, so we'll be calling up our open model.

75
00:05:45,680 --> 00:05:48,230
And apart from open water, we'll be returning zero.

76
00:05:50,860 --> 00:05:58,210
All right, and if not, then we want to just return an index that means our questions are not still

77
00:05:58,210 --> 00:05:58,690
finished.

78
00:06:00,200 --> 00:06:01,790
We want to attempt more questions.

79
00:06:03,510 --> 00:06:05,280
Return index.

80
00:06:07,400 --> 00:06:12,980
All right, so we have set it up our next question now, the last method that we used to up is to check

81
00:06:12,980 --> 00:06:14,750
our answers, whether they are right or not.

82
00:06:15,260 --> 00:06:18,950
So in order to be configuring on next questions.

83
00:06:19,160 --> 00:06:20,540
So consider.

84
00:06:21,720 --> 00:06:22,770
Check answers.

85
00:06:24,560 --> 00:06:31,010
That such a go and it is going to take up a value that we're going to get from.

86
00:06:32,450 --> 00:06:33,470
Abdul GS6.

87
00:06:35,390 --> 00:06:44,180
And now, if that is true, that means the answer is correct, then you want to set correct equals to

88
00:06:44,180 --> 00:06:45,530
it is going to take up Old State.

89
00:06:50,140 --> 00:06:54,250
And add one to that, so all state.

90
00:06:57,470 --> 00:07:01,940
Plus one, so now we are setting up answers, right?

91
00:07:02,800 --> 00:07:06,400
No, let me just get rid of this if value.

92
00:07:13,560 --> 00:07:20,100
Oh, it's an obvious answers, no answers, then we want to move on to next questions and our next question.

93
00:07:23,640 --> 00:07:30,120
All right, so now we have set it up all that we need inside of our provider.

94
00:07:31,170 --> 00:07:36,540
Apart from this, we are old and now we need to just export this data and imported into our different

95
00:07:36,540 --> 00:07:40,350
components and use them now hit save and let us do it.
