1 00:00:01,810 --> 00:00:02,590 Welcome back. 2 00:00:02,770 --> 00:00:08,100 Today, we're going to learn about Eastend new features, and it's called ECMAScript 2019. 3 00:00:08,170 --> 00:00:08,950 How cool is this. 4 00:00:09,520 --> 00:00:14,800 So when you consider where we were at the beginning with the is five now we are hearing learning about 5 00:00:14,800 --> 00:00:15,380 Eastend. 6 00:00:15,400 --> 00:00:21,960 So ladies and gentlemen, this is a huge success, huge improvement from where we were at the beginning. 7 00:00:22,390 --> 00:00:28,960 Every year they release updates with new features and that is making our lives as a developers more 8 00:00:28,960 --> 00:00:29,930 and much easier. 9 00:00:30,400 --> 00:00:30,810 Why? 10 00:00:30,820 --> 00:00:34,180 Because we need to we don't need to go back through what we have learned before. 11 00:00:34,450 --> 00:00:39,550 We have the knowledge from the past and we can upgrade that knowledge with the new features. 12 00:00:39,610 --> 00:00:41,670 Now, this is a cool part. 13 00:00:41,890 --> 00:00:43,320 So two things will happen here. 14 00:00:43,660 --> 00:00:48,770 Either they will update an old feature or a completely new feature in every incremental update to do 15 00:00:48,790 --> 00:00:49,870 right now. 16 00:00:50,110 --> 00:00:53,440 Today, we have a couple of important matters that I want to touch on. 17 00:00:53,830 --> 00:00:55,260 The first one is flat matter. 18 00:00:56,080 --> 00:00:59,830 The second one is flat map, dream, start stream and therefore the strings. 19 00:01:00,040 --> 00:01:03,970 And here their methods in try and catch block. 20 00:01:03,980 --> 00:01:07,720 So there is an update of that one, the way we are writing it. 21 00:01:07,870 --> 00:01:11,220 So it's not huge update, but it's worth mentioning. 22 00:01:11,260 --> 00:01:15,460 Okay, now the first one flat method now flat method. 23 00:01:15,490 --> 00:01:16,800 We can use it on eraser. 24 00:01:17,230 --> 00:01:22,790 OK, so let's write here something real quick so you can open any file or you can grab this year selector. 25 00:01:22,790 --> 00:01:26,530 I will put it there for you guys right now. 26 00:01:28,360 --> 00:01:30,250 So let's write something we haven't done before. 27 00:01:30,250 --> 00:01:31,660 So let's write an array. 28 00:01:31,660 --> 00:01:38,230 So const array here that will contain five numbers from one until five. 29 00:01:40,930 --> 00:01:43,240 OK, so we haven't done this before, right? 30 00:01:44,350 --> 00:01:45,100 Got that part. 31 00:01:45,280 --> 00:01:46,130 I'm just joking. 32 00:01:46,150 --> 00:01:48,070 So that is my sense of humor. 33 00:01:48,640 --> 00:01:50,730 OK, so we have done this one multiple times. 34 00:01:50,770 --> 00:01:57,700 Now, I can use the method here on top of this array and I will see a red dot flat. 35 00:01:58,480 --> 00:01:59,290 Let's see what's happening. 36 00:01:59,320 --> 00:02:01,120 I'm just going to copy this, the entire thing. 37 00:02:01,160 --> 00:02:04,480 I'm going back to the the browser. 38 00:02:04,480 --> 00:02:08,380 Go back to the console base that they're here enter. 39 00:02:08,830 --> 00:02:16,920 And while I bring us the same same array back and why we are learning this method then. 40 00:02:17,230 --> 00:02:17,680 Right. 41 00:02:17,710 --> 00:02:20,200 So you going to ask me, OK, why do we need this? 42 00:02:21,070 --> 00:02:23,840 So imagine if you have a mystery inside our array. 43 00:02:24,100 --> 00:02:29,230 So this will be the perfect time for us to see an example with nested arrays. 44 00:02:29,440 --> 00:02:31,630 OK, now move on. 45 00:02:32,740 --> 00:02:41,440 I am going to make this country one and I will just say one, two. 46 00:02:41,950 --> 00:02:45,610 And actually I'm going to put a mystery between two and three. 47 00:02:45,610 --> 00:02:50,500 I mean, for two and three, then I'm going to leave four alone and I'm just going to go back with the 48 00:02:50,500 --> 00:02:53,680 five and I'm going to add one more five and six here. 49 00:02:53,800 --> 00:02:54,790 So one more element. 50 00:02:54,790 --> 00:02:55,350 Each side. 51 00:02:55,550 --> 00:02:55,890 Right. 52 00:02:56,500 --> 00:02:56,920 OK. 53 00:02:56,980 --> 00:02:59,750 The array, one that flat. 54 00:03:01,660 --> 00:03:05,470 Remember, if I can write it, that will be great. 55 00:03:06,040 --> 00:03:11,100 Now remember that you need to specify every one because we need to flip this one now. 56 00:03:11,500 --> 00:03:15,040 Delete that one based on their hit enter. 57 00:03:16,030 --> 00:03:18,400 And what do you see at the moment? 58 00:03:20,350 --> 00:03:20,820 Wow. 59 00:03:21,070 --> 00:03:26,320 We have one single tree, no nesting inside and that is just flat. 60 00:03:26,770 --> 00:03:29,230 OK, so how cool is this? 61 00:03:29,500 --> 00:03:29,960 Easy. 62 00:03:30,040 --> 00:03:35,080 Now let's add another level of nesting and let's create a new area actually in. 63 00:03:35,500 --> 00:03:36,840 So that will be a new example. 64 00:03:36,850 --> 00:03:37,990 I'm just going to copy it here. 65 00:03:38,270 --> 00:03:39,210 I'm going to type it. 66 00:03:39,520 --> 00:03:41,040 So it's going to be a RETO here. 67 00:03:41,650 --> 00:03:50,730 And let's add another level here, and I'm going to wrap this six actually to another level. 68 00:03:51,370 --> 00:03:51,820 Nice. 69 00:03:52,810 --> 00:03:54,940 And Oradea, two flat. 70 00:03:55,960 --> 00:03:56,530 Copy it. 71 00:03:58,110 --> 00:04:03,030 This one pasted back enter, you can use anything, actually, you can use Google Chrome, it's easier 72 00:04:03,040 --> 00:04:03,290 there. 73 00:04:03,630 --> 00:04:05,640 Now look what's happening. 74 00:04:05,700 --> 00:04:10,920 I do have the array back, but this part, it's confusing right now. 75 00:04:10,920 --> 00:04:16,140 I have the array now have another array here. 76 00:04:16,980 --> 00:04:21,120 This array will have a one only one element called six. 77 00:04:21,630 --> 00:04:22,020 Right. 78 00:04:22,620 --> 00:04:24,430 So why is this happening now? 79 00:04:24,540 --> 00:04:25,750 OK, let me explain. 80 00:04:27,990 --> 00:04:33,210 Now, the interesting aspect of this flat method is that you can just specify how many levels we want 81 00:04:33,210 --> 00:04:34,650 to be flat in. 82 00:04:34,710 --> 00:04:35,850 The default is level one. 83 00:04:35,850 --> 00:04:37,460 And here we don't passing anything. 84 00:04:37,470 --> 00:04:42,750 So we don't if you don't pass any parameters here, like one, two or three, whatever it is, it's 85 00:04:42,750 --> 00:04:48,450 going to automatically know, OK, this is level one and I'm going to flatten the entire rate to level 86 00:04:48,450 --> 00:04:48,770 one. 87 00:04:49,260 --> 00:04:49,610 Right. 88 00:04:50,490 --> 00:04:53,910 Well, we can go crazy on this and we can just put it at level two here. 89 00:04:54,180 --> 00:04:57,360 Let me just change it here and now. 90 00:04:57,360 --> 00:04:58,910 You need to delete it. 91 00:04:58,920 --> 00:05:02,520 Also refresh and based it back. 92 00:05:03,150 --> 00:05:09,570 And voila, we have the entire array of six elements flatten and we have two levels inside. 93 00:05:09,750 --> 00:05:10,370 Nothing. 94 00:05:10,380 --> 00:05:11,970 Well, this was the first level. 95 00:05:12,900 --> 00:05:14,070 This is the second level. 96 00:05:14,070 --> 00:05:15,560 But inside we have the third level. 97 00:05:16,140 --> 00:05:19,410 So that is how we can flatten this one. 98 00:05:20,190 --> 00:05:23,720 OK, let me give you a crazy example here. 99 00:05:24,090 --> 00:05:24,830 Just bear with me. 100 00:05:25,920 --> 00:05:27,360 So I've copied from another file. 101 00:05:27,360 --> 00:05:28,320 I'm going to put it here. 102 00:05:29,000 --> 00:05:29,760 So what is this? 103 00:05:30,070 --> 00:05:32,870 OK, we do have an array with animals, right? 104 00:05:33,360 --> 00:05:36,330 We we have the sneak leyser squit. 105 00:05:36,900 --> 00:05:37,890 I don't know what is this. 106 00:05:38,400 --> 00:05:42,840 And yeah, we do have the dolphin fish or maybe Shakya this one. 107 00:05:42,870 --> 00:05:43,140 Right. 108 00:05:43,300 --> 00:05:47,880 We have the T rex here, the Dragon, Reino and Unicorn. 109 00:05:48,010 --> 00:05:49,290 How cool is this. 110 00:05:49,530 --> 00:05:51,120 But look at what what's happening here. 111 00:05:51,120 --> 00:05:58,800 This is nesting one level, one level now three levels here or more to levels you can put more levels. 112 00:05:59,670 --> 00:06:02,550 So how are you going to fix this now? 113 00:06:03,030 --> 00:06:06,450 What you want to do is actually to release all the animals from this cage. 114 00:06:06,990 --> 00:06:10,260 OK, I will give you like 50 seconds or a minute. 115 00:06:10,620 --> 00:06:14,490 Think about it and let me know the answer, OK? 116 00:06:15,180 --> 00:06:16,380 I don't ready. 117 00:06:16,920 --> 00:06:20,120 So there are multiple ways and I'm going to show you the most easiest one. 118 00:06:20,610 --> 00:06:29,810 So if you were like me, lazy, no, you can just go here and see animals not flat and just put it here. 119 00:06:30,000 --> 00:06:31,220 Twenty crazy big. 120 00:06:31,230 --> 00:06:37,770 No, I know there are not many levels inside, so let's copy paste it back here. 121 00:06:38,130 --> 00:06:40,420 Hit enter and voila. 122 00:06:40,440 --> 00:06:43,530 We do have that array completely flattened. 123 00:06:44,070 --> 00:06:44,430 Right. 124 00:06:44,730 --> 00:06:45,960 We don't have to think about it. 125 00:06:47,070 --> 00:06:47,440 Nice. 126 00:06:47,490 --> 00:06:50,910 There is other way that I will probably let you know but. 127 00:06:51,660 --> 00:06:53,190 And not, not at this stage. 128 00:06:53,190 --> 00:06:53,490 Right. 129 00:06:53,670 --> 00:06:55,290 OK, let's move on. 130 00:06:55,650 --> 00:07:01,200 So we stick to this flat to too much, but there are a couple more instances we can use. 131 00:07:01,200 --> 00:07:08,100 Another scenario is that when flatmate and is working, when we have a data that is not consistent, 132 00:07:08,100 --> 00:07:13,830 OK, let's create const data here and inside this data. 133 00:07:13,860 --> 00:07:15,310 This will be an array, right? 134 00:07:15,330 --> 00:07:18,030 I will have data of names in here. 135 00:07:18,040 --> 00:07:22,140 I haven't any time here. 136 00:07:22,500 --> 00:07:24,570 I use these names a lot in here. 137 00:07:24,570 --> 00:07:27,180 I will have like some gibberish. 138 00:07:27,180 --> 00:07:32,760 Nothing go Jason. 139 00:07:34,110 --> 00:07:35,760 And here we have empty one. 140 00:07:36,720 --> 00:07:40,890 The last one will be Chuck Norris. 141 00:07:41,340 --> 00:07:42,090 You know this guy. 142 00:07:42,270 --> 00:07:43,020 It's a legend. 143 00:07:43,620 --> 00:07:45,780 Please check it out if you don't know it. 144 00:07:46,320 --> 00:07:49,050 So data that's flat right now. 145 00:07:49,200 --> 00:07:50,160 Let's see what's happening here. 146 00:07:50,340 --> 00:07:52,110 So I have data that is not consistent here. 147 00:07:52,110 --> 00:07:53,250 I have these empty things. 148 00:07:53,250 --> 00:07:54,390 I have these three empty. 149 00:07:54,690 --> 00:08:00,420 Now, this is not so look, this in the empty street is not same. 150 00:08:00,900 --> 00:08:05,040 When I was first doing it, I was thinking, OK, maybe it's going to consider it as the same, but 151 00:08:05,040 --> 00:08:06,570 it's not OK. 152 00:08:07,110 --> 00:08:07,740 Hit enter. 153 00:08:08,740 --> 00:08:09,600 Very good. 154 00:08:09,600 --> 00:08:11,210 So I have any time to go. 155 00:08:11,220 --> 00:08:17,430 Jason, check Chuck Norris and I have these empty still there, but that's not a problem. 156 00:08:17,430 --> 00:08:21,450 I don't have the, the empty spaces here. 157 00:08:21,840 --> 00:08:22,290 Nice. 158 00:08:22,470 --> 00:08:28,380 So that will clean our data in data and we can use that really fast. 159 00:08:29,670 --> 00:08:31,830 Now the next feature is called Flatmate. 160 00:08:34,400 --> 00:08:44,420 OK, no flat map allows us to use the flat function and a map method on the array, so I'm going to 161 00:08:44,420 --> 00:08:46,660 use the animals here array. 162 00:08:47,270 --> 00:08:52,070 Let's create here const animal released. 163 00:08:53,360 --> 00:08:56,350 Now they're in a cage locked up. 164 00:08:56,900 --> 00:08:57,740 They can't go out. 165 00:08:57,950 --> 00:08:59,540 They can't eat the squid here. 166 00:08:59,930 --> 00:09:04,990 They can't eat the lizards or the the snake will not be able to eat any of it. 167 00:09:05,000 --> 00:09:05,350 Right. 168 00:09:05,360 --> 00:09:06,430 Or the rhino. 169 00:09:06,440 --> 00:09:07,000 Same goes. 170 00:09:07,190 --> 00:09:10,060 So I want a function that will do something crazy. 171 00:09:10,070 --> 00:09:11,240 It will release all of them. 172 00:09:11,430 --> 00:09:11,740 Right. 173 00:09:11,930 --> 00:09:15,560 OK, so for that I can do the looping and I can do animals. 174 00:09:16,730 --> 00:09:18,280 I should pass the equal sign there. 175 00:09:18,590 --> 00:09:26,780 So animals grabbing this rate, putting the flat map, that's this is a new method right in here. 176 00:09:26,780 --> 00:09:31,070 I'm going to pass the animal and I will say animal. 177 00:09:32,720 --> 00:09:34,430 That's a current element that I'm looking through. 178 00:09:34,520 --> 00:09:34,840 Right. 179 00:09:34,850 --> 00:09:38,680 You can put any name you want and I will say animal plus three. 180 00:09:39,740 --> 00:09:40,700 Now, what will happen? 181 00:09:40,700 --> 00:09:41,930 This, you know. 182 00:09:44,440 --> 00:09:51,220 OK, let's test it out, because I was thinking that you should know this bar, so I'm going to copy 183 00:09:51,220 --> 00:09:51,610 this one. 184 00:09:51,610 --> 00:09:52,690 I'm going to put it out here. 185 00:09:52,840 --> 00:09:55,020 I'm going to paste it and hit enter. 186 00:09:55,390 --> 00:09:58,390 Now go back to the animals released. 187 00:09:59,290 --> 00:10:03,280 And here it is, the one they were together before. 188 00:10:04,450 --> 00:10:06,670 I mean, this one, they're free now. 189 00:10:07,810 --> 00:10:08,250 Right. 190 00:10:08,770 --> 00:10:11,170 But not everything is free. 191 00:10:11,500 --> 00:10:12,700 So you can see that here. 192 00:10:12,730 --> 00:10:15,420 The snakes and this the snake is not free. 193 00:10:15,430 --> 00:10:16,120 Only this one. 194 00:10:16,210 --> 00:10:17,350 This guy's free. 195 00:10:17,590 --> 00:10:18,610 This one is free. 196 00:10:18,820 --> 00:10:21,160 This one is free and the fish free. 197 00:10:21,340 --> 00:10:23,310 So that is go for the both of them. 198 00:10:23,590 --> 00:10:24,010 Right. 199 00:10:25,600 --> 00:10:30,460 So you can know here, it's adding only free to only one level, not after that. 200 00:10:30,640 --> 00:10:33,720 So not every animal will be free from this prison cell. 201 00:10:34,390 --> 00:10:35,650 Go now. 202 00:10:35,680 --> 00:10:36,970 That's enough for this map method. 203 00:10:36,970 --> 00:10:38,980 You can use it for more meaningful ways. 204 00:10:39,560 --> 00:10:42,300 Now let's talk about dreams start and end. 205 00:10:42,310 --> 00:10:44,200 And this is actually on string's. 206 00:10:46,780 --> 00:10:56,680 Let's ride const username here, and I will see here a couple of empty spaces and I will say Rick here, 207 00:10:57,250 --> 00:10:59,320 right consed last name. 208 00:11:03,920 --> 00:11:12,170 OK, maybe we should make it like this nice so username in the last name, I do have them both, but 209 00:11:12,770 --> 00:11:16,450 I am going to think here we can do something else. 210 00:11:16,820 --> 00:11:19,790 I can add the two methods in one go no here. 211 00:11:20,210 --> 00:11:22,670 Username and last name. 212 00:11:22,670 --> 00:11:28,370 The user may have empty spaces in front in the last name has empty spaces after that. 213 00:11:28,670 --> 00:11:33,740 So the quickest and easiest way to use a method is we can do it. 214 00:11:35,450 --> 00:11:39,860 So the cost control along actually it will save me. 215 00:11:39,860 --> 00:11:41,750 Thought it will save me time to write it here. 216 00:11:41,840 --> 00:11:42,180 Right. 217 00:11:42,530 --> 00:11:43,580 Just going to close this one. 218 00:11:46,700 --> 00:11:48,950 Close that one now comes a lot. 219 00:11:48,950 --> 00:11:54,800 I'm going to say username that so I can use here trem start. 220 00:11:55,520 --> 00:11:55,970 Why. 221 00:11:56,000 --> 00:12:01,970 Because I know, I know that I have empty spaces in front of this here. 222 00:12:02,180 --> 00:12:10,790 I'm going to copy it here, I'm going to pass it back and I'm going to say last name, Treme and OK 223 00:12:11,270 --> 00:12:15,290 now let's go there based back hit enter. 224 00:12:15,710 --> 00:12:16,190 Nice. 225 00:12:16,700 --> 00:12:20,630 So you can see that I don't have any empty spaces, I don't have spaces in the end. 226 00:12:20,840 --> 00:12:27,440 So the Treme start will Treme, all these pieces that are trailing before and and the last name Will 227 00:12:27,440 --> 00:12:30,050 Treme actually Treme and Will Treme. 228 00:12:30,050 --> 00:12:31,430 All of these spaces. 229 00:12:31,670 --> 00:12:32,450 They were here. 230 00:12:32,880 --> 00:12:33,230 Right. 231 00:12:33,710 --> 00:12:43,540 So you can do comes a lot actually you can do a lot here on the username in here it is. 232 00:12:43,790 --> 00:12:48,560 See how many empty spaces we have before you can do the same thing for the last three 233 00:12:51,440 --> 00:12:51,800 nights. 234 00:12:52,340 --> 00:12:57,690 So actually you can't see it, but it's there like this when you did. 235 00:12:58,340 --> 00:12:59,120 Oh, OK. 236 00:12:59,600 --> 00:13:05,140 That is pretty much quick review of the feature stream start and stream. 237 00:13:05,180 --> 00:13:12,320 And now another feature is from entries I always mix it up with from entries for entries, but it's 238 00:13:12,320 --> 00:13:13,610 from entries. 239 00:13:13,790 --> 00:13:20,480 So it will transform a list of key value pairs back to an object, not an array, but to an object. 240 00:13:20,690 --> 00:13:23,600 So let's do a quick sample here. 241 00:13:23,720 --> 00:13:27,950 No, I'm going to create here a username array, right. 242 00:13:28,310 --> 00:13:38,570 So const user names in these array will have here, Andy and I will say, OK, let's give it the last 243 00:13:38,570 --> 00:13:38,780 name. 244 00:13:39,050 --> 00:13:42,050 Murray is a tennis player, by the way. 245 00:13:42,050 --> 00:13:52,010 I don't like it, but I don't know his name is there in my mind all time to time party cuz I like this 246 00:13:52,010 --> 00:13:55,310 guy forty five and I'm not sure how old is he now. 247 00:13:55,310 --> 00:13:56,090 I have the Morgan. 248 00:13:58,820 --> 00:14:05,640 Freeman, I hope I spell his last name right, 70 to maybe he's 75. 249 00:14:05,760 --> 00:14:07,030 I'm no good. 250 00:14:07,280 --> 00:14:08,270 Now look at this array. 251 00:14:08,360 --> 00:14:09,410 It's pretty much unusable. 252 00:14:10,460 --> 00:14:11,660 So what we can do about it. 253 00:14:11,670 --> 00:14:19,360 So it will be real nice if we have the name and the age associated together combined. 254 00:14:20,540 --> 00:14:24,400 And for that reason, we do have the object out from entries, right? 255 00:14:24,890 --> 00:14:26,690 No object. 256 00:14:27,950 --> 00:14:29,000 Not from. 257 00:14:31,140 --> 00:14:31,740 Entries 258 00:14:34,470 --> 00:14:35,200 in here. 259 00:14:35,220 --> 00:14:40,390 I'm going to pass the user names, not user name user names, right? 260 00:14:41,100 --> 00:14:41,490 Plural. 261 00:14:42,220 --> 00:14:49,670 OK, let's copy this one based on back there, enter. 262 00:14:50,130 --> 00:14:57,930 Well, we do have an object, Andy, that is associated with t h so this is super, super powerful. 263 00:14:57,930 --> 00:15:00,330 One of the best features for this section. 264 00:15:01,140 --> 00:15:07,020 So I have an array that's completely unusable, so we can't do much about it. 265 00:15:07,290 --> 00:15:15,300 But here I do have with Object of Promontories each returning us an object where the name is associated 266 00:15:15,300 --> 00:15:18,330 with the H and that is pretty much powerful. 267 00:15:18,990 --> 00:15:19,410 So. 268 00:15:20,590 --> 00:15:27,970 This is something very special because it links to a feature that I haven't done it before, and that 269 00:15:27,970 --> 00:15:29,370 feature was released in the USA. 270 00:15:29,860 --> 00:15:30,240 Cool. 271 00:15:30,460 --> 00:15:33,600 Now that feature is totally opposite of this one. 272 00:15:33,970 --> 00:15:39,900 And this was the place that I was thinking that it's best to say it now to object. 273 00:15:40,060 --> 00:15:41,200 I'm just going to create here. 274 00:15:42,400 --> 00:15:45,990 Const OBJ stands for object end user names. 275 00:15:46,530 --> 00:15:50,050 OK, I am going to pass the entire area here, 276 00:15:53,090 --> 00:15:54,580 I'm just going to copy paste it back. 277 00:15:55,060 --> 00:15:56,050 So username is one. 278 00:15:56,410 --> 00:15:57,560 Let's do it like this. 279 00:15:58,740 --> 00:16:10,500 Now what I can do here is I can do object dot from entry's and I will say object. 280 00:16:12,190 --> 00:16:13,770 So it's pretty much the same as this one. 281 00:16:14,110 --> 00:16:18,130 But let's do the other one object the entries. 282 00:16:21,860 --> 00:16:28,160 In our powers, the object again, no, I've done this because I, I will have a problem if I run the 283 00:16:28,160 --> 00:16:28,740 same one here. 284 00:16:29,210 --> 00:16:30,710 Now let's hit it. 285 00:16:30,710 --> 00:16:31,060 Enter. 286 00:16:31,490 --> 00:16:36,430 So the first one, actually, the last one will return me on the array. 287 00:16:37,820 --> 00:16:41,420 So if I copy this one, refresh. 288 00:16:42,050 --> 00:16:42,800 Delete that one. 289 00:16:45,060 --> 00:16:47,380 Remove it this heat enter. 290 00:16:47,700 --> 00:16:54,040 So I do have the object now, but the entrance is totally opposite it, return us from the object and 291 00:16:54,060 --> 00:16:55,680 shift us back to the Narey. 292 00:16:57,450 --> 00:16:58,020 Look at this. 293 00:16:59,130 --> 00:17:04,220 So I have a rate of two elements inside and its name and the Murray. 294 00:17:04,380 --> 00:17:06,170 But the same goes for this. 295 00:17:06,810 --> 00:17:07,770 Same goes for this. 296 00:17:08,640 --> 00:17:12,280 Now, object entries is totally opposite from Promontories. 297 00:17:12,600 --> 00:17:14,410 This is turning the array to an object. 298 00:17:14,430 --> 00:17:16,980 This is turning back the object on the right. 299 00:17:17,610 --> 00:17:22,210 Cool in a problem is the last feature will be about trying to catch one. 300 00:17:22,380 --> 00:17:27,800 Now try and catch right. 301 00:17:27,810 --> 00:17:34,050 Remember here we passing the error all the time and here we counseling like the error. 302 00:17:37,600 --> 00:17:45,700 And here we can pass the actual error now in a trap like we always put the code that we want to be executed, 303 00:17:45,700 --> 00:17:46,060 right. 304 00:17:46,630 --> 00:17:49,660 And if there is an error, we catch the error with the with this one. 305 00:17:50,170 --> 00:17:53,620 Now, here I'm going to say Morgan. 306 00:17:57,910 --> 00:18:02,460 Plus, let's give a space for your free man. 307 00:18:03,620 --> 00:18:11,470 OK, now I shouldn't get any error if I run in here, delete this one pasted back and here it is. 308 00:18:11,470 --> 00:18:13,060 I do have the Morgan Freeman. 309 00:18:13,060 --> 00:18:13,440 Right. 310 00:18:13,750 --> 00:18:16,090 So it's concatenating these two strings. 311 00:18:16,330 --> 00:18:19,420 I don't have an error in here. 312 00:18:19,420 --> 00:18:22,060 I do have I'm the error that it's from there. 313 00:18:22,630 --> 00:18:28,260 OK, so let's throw an error here and see what's happening. 314 00:18:33,330 --> 00:18:35,370 Remember that we can throw an error like this. 315 00:18:38,700 --> 00:18:46,250 OK, now I do have the error is there putting it out right this one, plus I have the function error. 316 00:18:46,260 --> 00:18:50,670 What's what's wrong with it right now in yes. 317 00:18:51,120 --> 00:18:53,220 Ten or twenty 19. 318 00:18:53,820 --> 00:18:55,130 There's something more easier. 319 00:18:55,800 --> 00:18:59,790 We don't have to specify this parameter here or this argument that we are passing to an error. 320 00:19:00,240 --> 00:19:00,620 Right. 321 00:19:01,440 --> 00:19:03,260 It's still going to catch us the error. 322 00:19:03,270 --> 00:19:06,940 So that is pretty much all about trying to catch. 323 00:19:07,580 --> 00:19:08,860 I'm just going to refresh here. 324 00:19:10,530 --> 00:19:12,030 Here it is, still catching the error. 325 00:19:12,540 --> 00:19:14,160 We don't have to specify that error. 326 00:19:14,250 --> 00:19:14,590 Right. 327 00:19:14,610 --> 00:19:22,750 If we actually remove the throw and here it is, is going to execute what we have in the trial. 328 00:19:23,850 --> 00:19:24,280 Nice. 329 00:19:24,330 --> 00:19:31,110 So, ladies and gentlemen, these are the features that were the most famous for, yes. 330 00:19:31,110 --> 00:19:34,210 19 or sorry, eastern 2019. 331 00:19:35,100 --> 00:19:36,110 Now, you know all of it. 332 00:19:36,540 --> 00:19:38,940 Let's recap what we have done. 333 00:19:38,950 --> 00:19:41,880 Flat metal on a flat map here. 334 00:19:41,880 --> 00:19:47,700 We can specify an argument how many levels we want to start treatment to a string and try and catch 335 00:19:47,730 --> 00:19:48,090 Bluck. 336 00:19:48,480 --> 00:19:48,900 Nice. 337 00:19:49,380 --> 00:19:53,940 It also I haven't done it here, but it should be like this. 338 00:19:54,300 --> 00:19:56,280 It's from entries, right? 339 00:19:56,320 --> 00:19:56,930 The last one. 340 00:19:57,570 --> 00:19:58,900 See, I've got about it. 341 00:19:59,310 --> 00:20:03,920 OK, I'm just going to do it here and this will be number six. 342 00:20:05,160 --> 00:20:05,640 Nice. 343 00:20:06,310 --> 00:20:07,970 So that is pretty much it. 344 00:20:08,280 --> 00:20:14,700 And also we have learned the opposite of this one and that is the entries only that will turn that will 345 00:20:14,700 --> 00:20:18,000 convert the object back to an array sticker. 346 00:20:18,000 --> 00:20:19,140 And I will see you in the next one.