1 00:00:00,210 --> 00:00:01,230 Not bad, not bad. 2 00:00:01,260 --> 00:00:08,770 What we can do next is maybe set up clear list functionality since it's going to be the fastest one. 3 00:00:09,330 --> 00:00:15,720 Now, before we do that, though, why don't we also alert over here when we're adding new items? 4 00:00:16,230 --> 00:00:23,550 So what I could say here, instead of this comment, I can call my show alert and then what kind of 5 00:00:23,550 --> 00:00:24,950 values we would want to pass in. 6 00:00:25,380 --> 00:00:30,150 Well, first, of course, I would want to show the alert so shown to be true. 7 00:00:30,510 --> 00:00:31,110 I got it. 8 00:00:31,560 --> 00:00:37,530 Then we're going to pass in success since that is going to be our second class that we can display. 9 00:00:37,740 --> 00:00:39,750 And then we have some kind of text. 10 00:00:40,080 --> 00:00:41,940 As far as the text, I'm going to go with item. 11 00:00:42,920 --> 00:00:51,350 Added to the list, to the list, let's say it to start going to type some gibberish, I'm going to 12 00:00:51,350 --> 00:00:56,750 press on the IS now have my word and in three seconds it goes away. 13 00:00:57,830 --> 00:01:05,830 And now let's deal with the clear list functionality where I would want to set up a function in seconds. 14 00:01:05,880 --> 00:01:11,870 And that is equal to a clear, clear list is our function. 15 00:01:12,230 --> 00:01:14,270 And I'm not going to be looking for any arguments. 16 00:01:14,600 --> 00:01:16,150 I'm just going to alert. 17 00:01:16,430 --> 00:01:22,940 So I'm going to say, hey, listen, you are deleting the items, so tomorrow will be for my show. 18 00:01:23,240 --> 00:01:30,470 Then the class name will be Danger and then I'm going to be setting up the text of empty and then w 19 00:01:30,770 --> 00:01:35,600 and we already know that if we want to wipe out all the values, which is code set list. 20 00:01:36,890 --> 00:01:44,840 And then we set it equal to an empty array and that when we would want to call it well, when we click 21 00:01:44,840 --> 00:01:47,380 on Clear Items button, correct. 22 00:01:47,630 --> 00:01:55,250 So we go on click and then we just have clear, of course, what was the normal function. 23 00:01:55,520 --> 00:01:56,690 So a clear list. 24 00:01:57,230 --> 00:02:00,770 My dad forgot my function name are list. 25 00:02:01,010 --> 00:02:04,270 And of course, let's add the jibberish and there it is. 26 00:02:04,280 --> 00:02:05,480 Now we have clear items. 27 00:02:05,510 --> 00:02:12,230 So what can happen is I can click and now of course I can empty the list.