[User] Please transcribe this text

[Assistant] Exactly, so come to our website EnglishPod.com and let us know how it works in your countries. I know that many different countries have a different way of treating time, so share it with us.


[User] Please transcribe this text

[Assistant] The three most beautiful and creative looking dishes.


[User] Please transcribe this text

[Assistant] Whoever brings us the best dish in the mystery box gets that all important advantage in the next challenge, the invention test. Curtis, do you want to do the arms?


[User] Please transcribe this text

[Assistant] Today, each of you must use three of these ingredients in your dish.


[User] Please transcribe this text

[Assistant] Fix in your mind what you want to use, step back into line. Time to make a decision, what three ingredients you're going to cook with and force everybody else to cook with too. Sammy? I'm going to pick the kingfish, the capers and the turnips. Gee, you just made a lot of people very happy.


[User] Please transcribe this text

[Assistant] So, some rules? You have 60 minutes. Open pantry, gardens in play. Kingfish?


[User] Please transcribe this text

[Assistant] Capers and baby blush turnips all must be championed in your dish. Bring us the best dish though and you win the power pin. Curtis, let's get them started.


[User] Please transcribe this text

[Assistant] There's nothing like beautiful ingredients to inspire a great cook and let us tell you there's some great cooking going on there. But, let's just point out the fact that that power pin could have given you an extra 15 minutes today. Who would have liked that? Yeah!


[User] Please transcribe this text

[Assistant] Some good flavours, but that whisky, that's really strong and that may put you in the bottom four. Callum.


[User] Please transcribe this text

[Assistant] There's nothing that convinces me that that's a dumpling. It makes me feel like I'm having a ravioli with a weird concoction of ingredients.


[User] Please transcribe this text

[Assistant] The next dish we'd like to taste belongs to Sam.


[User] Please transcribe this text

[Assistant] Some of you stumbled when it counted most. If I call your name, please step forward. You are in tomorrow's pressure test.


[User] Please transcribe this text

[Assistant] The four of you are in tomorrow's pressure test. Unfortunately, from there, one of you is going home.


[User] Please transcribe this text

[Assistant] There is differences in oil content within the fish, so the belly region is more fattier than the shoulder of the fish, so it's versatile.


[User] Please transcribe this text

[Assistant] Welcome back to your basic English lesson. Today we will learn about the months and the days. So get some paper and a pencil and let's get started.


[User] Please transcribe this text

[Assistant] First, let's learn the months. Number one is January. Number two, February. Three, March. Four, April. Five, May. Six, June. Seven,


[User] Please transcribe this text

[Assistant] 10 October. 11 November. And 12 December.


[User] Please transcribe this text

[Assistant] These are the months. Well, the 12 months. They make one year. This is a calendar.


[User] Please transcribe this text

[Assistant] Let's look at the calendar some more.


[User] Please transcribe this text

[Assistant] In one year, there are twelve months.


[User] Please transcribe this text

[Assistant] Fifty two weeks. Three hundred and sixty five days.


[User] Please transcribe this text

[Assistant] Okay, now let's learn how to say the date. We'll draw them. Calendar again.


[User] Please transcribe this text

[Assistant] This means it is the first.


[User] Please transcribe this text

[Assistant] So what day is this? It's ND. Second. This means it is the second.


[User] Please transcribe this text

[Assistant] Third. This means it is the third. Okay, four. The. The.


[User] Please transcribe this text

[Assistant] Fourth, this means it is the fourth.


[User] Please transcribe this text

[Assistant] So five, the, fifth. This means it is the fifth.


[User] Please transcribe this text

[Assistant] Thuh. It's the 11th. This is the 11th day.


[User] Please transcribe this text

[Assistant] This is the 21st day. So, what do you think this is?


[User] Please transcribe this text

[Assistant] N-D. Twenty second.


[User] Please transcribe this text

[Assistant] This is the 22nd day. Good job. So what is this?


[User] Please transcribe this text

[Assistant] 23rd. This is the 23rd day.


[User] Please transcribe this text

[Assistant] Hmm. What do you think this is?


[User] Please transcribe this text

[Assistant] Good job. It's the 24th. This is the 24th day.


[User] Please transcribe this text

[Assistant] ST again, good. It's the 31st. Wow, that was a lot. So, let's practice


[User] Please transcribe this text

[Assistant] Let's draw the picture again here, the calendar. What is the date today? Hmm, right there. It's Thursday, March 3rd.


[User] Please transcribe this text

[Assistant] Okay, when is Hulk's birthday?


[User] Please transcribe this text

[Assistant] Oh, there he is. It's Thursday, March 31st. Okay, when is Grandma going dancing? There she is. On Friday, March 11th.


[User] Please transcribe this text

[Assistant] So what is the date that you are watching this video? Leave me a comment for this video on what day you are watching it. So great job today. I will see you for the next lesson.


[User] Please transcribe this text

[Assistant] To finish this project, let's now learn about a technique called refactoring in order to get rid of some of our duplicate code.


[User] Please transcribe this text

[Assistant] So as I said by the end of the last lecture, we have some repeated code in our project.


[User] Please transcribe this text

[Assistant] And more specifically, where we can really see this is in these two scenarios. Where the guess is too high and where the guess is too low. So here this code is really almost the same as this code down here. The only thing that really changes is


[User] Please transcribe this text

[Assistant] Uh, this string here. So this message that we display if the guess is too high or if it's too low. And so having a lot of duplicate code, uh, remember violates the don't repeat yourself principle. So the dry principle.


[User] Please transcribe this text

[Assistant] So right now, this, uh, all of this code here is not dry.


[User] Please transcribe this text

[Assistant] Now, why is it actually so bad to have duplicate code? You might ask.


[User] Please transcribe this text

[Assistant] Well, one of the answers is that whenever we have duplicate code, when we then want to change some functionality, we have to change the same code in multiple places. For example, we might want to change the message when the player loses the game.


[User] Please transcribe this text

[Assistant] So this one here, right? And then we would have to change it here and here. And in a small example like this, it's not a big problem, but it can quickly become a nightmare for a bigger code base. So try to avoid duplicate code whenever you can.


[User] Please transcribe this text

[Assistant] However, when we first write a code, then it's no big problem to start out with duplicate code. And so that's why I did it like this year. That's why we have this duplicate code, because I just wanted to make it work. But then as we move on in the project, we can use a technique called refactoring.


[User] Please transcribe this text

[Assistant] And refactoring basically means to restructure the code, but without changing how it works. So basically we do refactoring to improve the code and to eliminate duplicate code.


[User] Please transcribe this text

[Assistant] And so let's now start to refactor all of this code here that we just talked about before. So the first step of refactoring is to identify duplicate or almost duplicate code like we already have here. So this code here is almost the same as this one.


[User] Please transcribe this text

[Assistant] With this string here being the only exception. And so what we're gonna do now is a way to eliminate half of this code here basically. So, how are we going to do that? Well,


[User] Please transcribe this text

[Assistant] This first if block here checks if the guess is too high, and this one checks if the guess is too low. But in both cases, what we're really doing is to check if the guess is different from the secret number, right?


[User] Please transcribe this text

[Assistant] So whenever the guess is different from the secret number, then all of this code here should get executed.


[User] Please transcribe this text

[Assistant] Right? Where the only thing that changes is this string.


[User] Please transcribe this text

[Assistant] So instead of having one big block for the case where the guess is too high and one for when the guess is too low, let's just have one block for the situation where the guess is different. So let me actually add a new else if block here and then we delete these two. Okay.


[User] Please transcribe this text

[Assistant] Basically. And so that means basically the opposite of this. So here we have when the player wins, is guess equal secret number. But here, when the guess is wrong, it means that guess is different from secret number.


[User] Please transcribe this text

[Assistant] And so now we can just take this code, which is the same in the two blocks, I will copy it, and paste it here.


[User] Please transcribe this text

[Assistant] So this is what should happen, except that the 2 high should of course only happen when the guess is larger than the secret number. So now we still need a conditional to figure out if the guess is greater or lower than the secret number.


[User] Please transcribe this text

[Assistant] Now what I'm going to do here is to actually use a ternary operator. And so let me show you how.


[User] Please transcribe this text

[Assistant] So I would say, when the guess is greater than the secret number,


[User] Please transcribe this text

[Assistant] Then here the string should be too high. And if not...


[User] Please transcribe this text

[Assistant] So else, then it means that the guess is less than a secret number. That's just the opposite, right? And so then, we want this string.


[User] Please transcribe this text

[Assistant] So, copy that. Put it here. And that's it. So I will give it a save. And now we can safely delete all of this here.


[User] Please transcribe this text

[Assistant] Let's delete it, or actually let me just comment all of it. So that you can still keep it here as a reference.


[User] Please transcribe this text

[Assistant] Now here something is, uh, kind of wrong. Oh, and that's because I took away the closing curly brace here. So this one.


[User] Please transcribe this text

[Assistant] And so now everything should be correct. So you see the red underline is gone there now. And so let me explain again what we did here.


[User] Please transcribe this text

[Assistant] So first we unified the two conditions that we had earlier, where the guess was either greater or larger than a secret number.


[User] Please transcribe this text

[Assistant] Both of these basically mean that the guess is different than the secret number. And so we just created a block for that. Because all of this code here is the same in both situations.


[User] Please transcribe this text

[Assistant] The only thing that changes is the message that is displayed on the page. And so here we then basically determined that message with the ternary operator. So here is where we then ask


[User] Please transcribe this text

[Assistant] If the guess is greater than the secret number, and if it is, then the text content here should be too high. But if it's not, then the text content should become too low.


[User] Please transcribe this text

[Assistant] And remember that this works because the ternary operator is really an operator. And so it will return basically a value. Okay, so all of this here, all this operator will return a value. Either this one here.


[User] Please transcribe this text

[Assistant] Or this one. And so then that value is what will get stored in the text content of this message element. So let's now test this actually.


[User] Please transcribe this text

[Assistant] And so, it's gotta be 18. And yes, everything worked. And so, all refactoring here was indeed successful. And I hope it made sense to you. You can just pause the video and review your code, uh, in case that it's not 100% clear yet. Okay?


[User] Please transcribe this text

[Assistant] Alright, so we fixed that by simply condensing two versions of almost the same code into just one.


[User] Please transcribe this text

[Assistant] However, sometimes a good refactoring technique is also to create functions. For example, we have the same code here in multiple places. So this code where we set the message.


[User] Please transcribe this text

[Assistant] So as I select this code here, VS Code will highlight all the same versions of the code in the entire file. So you see that we have this document.querySelectorMessage.textContent all over the place here.


[User] Please transcribe this text

[Assistant] Right, well at least one, two, three, four times. Down here, yeaah here, so five times even. So that's a lot of duplicate code. And the same is true for setting the number or for setting the score.


[User] Please transcribe this text

[Assistant] Or also, for example, for calculating this random secret number. We have the same code here.


[User] Please transcribe this text

[Assistant] And also here. And whenever that happens, we can also refactor this same code into a function and then call the function in all the places where we have to duplicate code.


[User] Please transcribe this text

[Assistant] So, basically, we can refactor functionality that we use over and over again into their own functions in order to make the code more dry. Now, I'm not going to do that into all the examples that I just mentioned, but I will do it with setting the message text content. Alright? So, what I will do is to copy this


[User] Please transcribe this text

[Assistant] Okay, and then I will create a function out here. And the function will be called display.


[User] Please transcribe this text

[Assistant] So it's a function, and the parameter will be the message.


[User] Please transcribe this text

[Assistant] And then in the function block, all we will do is this repeated code, so setting the message, and then we will set it equal to the message that is passed into the function.


[User] Please transcribe this text

[Assistant] And now to show you how it works, well, let's just use it down here.


[User] Please transcribe this text

[Assistant] So instead of this, let me comment it out. I can now simply say display message and then with this string. So this string is now the argument.


[User] Please transcribe this text

[Assistant] Okay, and so this argument is what will become the message here in this function when I call it. Right? And so then, here we say document.querySelector for the message.textContent should be the message that we just passed in. That makes sense, right? And so basically, we took this code here.


[User] Please transcribe this text

[Assistant] Which is responsible for setting the message and put it into this display message function that we can now use everywhere instead of having this repetitive code.


[User] Please transcribe this text

[Assistant] And just to show you that it works, let's now just actually do this. So clicking here without any content. And so now we should see the no number displaying here just like before. And indeed, it works just fine.


[User] Please transcribe this text

[Assistant] So, let's now go ahead and replace all of these occurrences of this same code.


[User] Please transcribe this text

[Assistant] I will not delete them, I will just comment them out, but you can go ahead and delete them from your codebase if you feel like it. Instead, let's just use always display message.


[User] Please transcribe this text

[Assistant] Because that is a lot cleaner. Also, this really shows what we're doing here. So when we're reading the code, we don't have to really understand what's happening.


[User] Please transcribe this text

[Assistant] If we try to read this code, uh, like one year from now, and if we then come here, we have to try to understand what all of this means here, right?


[User] Please transcribe this text

[Assistant] But instead, if we simply have a function called displayMessage, it's a lot easier to simply read the code and say, okay, this here probably means to display a message, and this here is going to be the message.


[User] Please transcribe this text

[Assistant] Right? That's a lot easier to understand when you read the code later.


[User] Please transcribe this text

[Assistant] And that's also an important thing in web development. So here is another one. And this is the one that we just refactored earlier. So this one is going to be a little bit different. So display message.


[User] Please transcribe this text

[Assistant] And now here we need the argument. But that's no problem. We can simply do the exact same thing that we did here. So let's just grab this. And now we can comment this out.


[User] Please transcribe this text

[Assistant] And actually this one too. And just paste it here.


[User] Please transcribe this text

[Assistant] And so now, according to this condition here, the argument will either be too high or too low. Because the result of this operator, once again, will be either this first string here or this second string. And so that will then be the argument and the message will then be displayed accordingly.


[User] Please transcribe this text

[Assistant] Okay, and down here there's another one. Yes, here. So, display message.


[User] Please transcribe this text

[Assistant] And give it a save. And so now everything should work the same.


[User] Please transcribe this text

[Assistant] Yeah, everything works just the same, but our code is a little bit more dry now.


[User] Please transcribe this text

[Assistant] And as I said, you could do the same for all the repetitive stuff here.


[User] Please transcribe this text

[Assistant] Which I will actually not do here because that takes too much time, but you can of course have some fun and do it on your own. But there's really no need to do it. I just wanted to make a point here that this is a really important thing that we do when we write real code.


[User] Please transcribe this text

[Assistant] So always keep refactoring in mind when you write your own code. And of course, we will do a lot of refactoring throughout this course.


[User] Please transcribe this text

[Assistant] Anyway, with this, we finished this project. Again, I really hope that you liked it and that you maybe showed it to a friend or so and told him that you did it in this course and how much fun it really is to build something like this.


[User] Please transcribe this text

[Assistant] Next up, we have another project, which is also going to be really fun, because we will build a real UI component. And that's going to be a modal window. So stay tuned for that one, once you finished this one and really understood how all of it works.


[User] Please transcribe this text

[Assistant] Part of the competition, you know it. The ups and downs, the challenges that we throw at you, it's all a rite of passage. We've said it before.


[User] Please transcribe this text

[Assistant] You know what's good too is he made the most of the equipment that he had, you know, and he was able to, you know, utilise all of those things to, you know, make a delicious dish.


[User] Please transcribe this text

[Assistant] Hey look, duck loves pickles, it loves cherries, you know, and uh, caramelized shallots loves them too. Ducks cook nicely though, don't they?


[User] Please transcribe this text

[Assistant] Around the globe, governments are taking on a role in regulating how personal data is gathered and used. In this video, we'll take a high-level look at the most prominent laws, GDPR, CCPA and COPPA.


[User] Please transcribe this text

[Assistant] It's important for marketing analysts to know about these laws as they regulate how user data can be used.


[User] Please transcribe this text

[Assistant] And of course, as a consumer, it's also good to know what your rights are.


[User] Please transcribe this text

[Assistant] All three of these regulations affect how much and what type of data an advertiser can use for database advertising. Let's begin with GDPR. GDPR stands for the General Data Protection Regulation.


[User] Please transcribe this text

[Assistant] It's a law that protects data and online privacy in the European Union.


[User] Please transcribe this text

[Assistant] GDPR is a very detailed and pretty complex law. At a high level, we can group some of its key requirements in two buckets.


[User] Please transcribe this text

[Assistant] European citizen data rights and data protection obligations for companies who collect the data.


[User] Please transcribe this text

[Assistant] The law specifies that people have the right to access the personal information received about them, they have the right to correct that information, the right to have all the information that was collected and saved about them erased,


[User] Please transcribe this text

[Assistant] And they have the right to data portability. In other words, they have the right to get a file of their personal information and pass it on to another party.


[User] Please transcribe this text

[Assistant] As for the data protections obligations, the law specifies how companies must protect the information they receive.


[User] Please transcribe this text

[Assistant] It also specifies that companies must alert people within 72 hours if their personal data was leaked, and companies must designate people whose job it will be to protect the data they received.


[User] Please transcribe this text

[Assistant] The law also says that companies should limit their data collection and that certain data categories are prohibited. For instance, ethnicity and sexual orientation.


[User] Please transcribe this text

[Assistant] And before receiving any data, companies should ask for permission. This is the right to prior consent.


[User] Please transcribe this text

[Assistant] GDPR was developed and is managed by the European Union.


[User] Please transcribe this text

[Assistant] Any company that works with the personal data of EU residents must comply, no matter where the business is based. In practice, this means that most digital businesses have to comply with this law.


[User] Please transcribe this text

[Assistant] The different EU countries each have their own supervisory authorities that monitor compliance.


[User] Please transcribe this text

[Assistant] Fines related to GDPR can be substantial, up to 4% of the annual revenue of a company.


[User] Please transcribe this text

[Assistant] In October 2020, clothing retailer H&M was issued a $41 million GDPR fine after several hundred employees were found to be illegally under surveillance.


[User] Please transcribe this text

[Assistant] The company kept extensive profiles of employees, families, illnesses and religious beliefs.


[User] Please transcribe this text

[Assistant] The data protection authority of Hamburg, Germany, found that this case showed a disregard for GDPR data protection rules.


[User] Please transcribe this text

[Assistant] Laws like this and fines of this magnitude have reinforced how seriously the European Union is staking personal data privacy.


[User] Please transcribe this text

[Assistant] Next, let's look at the CCPA. In 2019, the governor of California signed into law the California Consumer Privacy Act. Enforcement of the law started in 2020.


[User] Please transcribe this text

[Assistant] The strictest of any consumer privacy laws in the US this law aims to give residents of California more privacy and protection. This law is not dissimilar from the GDPR.


[User] Please transcribe this text

[Assistant] The law wants to give consumers more insight into what data is collected about them and a say in whether or not they want their data collected.


[User] Please transcribe this text

[Assistant] The right to know what information is collected about them?


[User] Please transcribe this text

[Assistant] The right to know whether their data is sold and to whom, and the right to opt out of that sale,


[User] Please transcribe this text

[Assistant] The right to access the personal information that was collected about them.


[User] Please transcribe this text

[Assistant] The right to require a business to delete their personal information and finally the right to not be discriminated against for exercising their rights under the Act.


[User] Please transcribe this text

[Assistant] The CCPA files under the responsibility of the California State Attorney General's Office.


[User] Please transcribe this text

[Assistant] Any business that collects and controls the personal information of California residents should comply with the CCPA.


[User] Please transcribe this text

[Assistant] The California Attorney General and residents of California can initiate lawsuits.


[User] Please transcribe this text

[Assistant] The law went into effect in January 2020.


[User] Please transcribe this text

[Assistant] Still a bit too early for any high profile lawsuits under this law.


[User] Please transcribe this text

[Assistant] Another important law to be aware of as a marketing analyst is COPPA or the Children's Online Privacy Protection Act. This US law took effect in 2000 and limits the collection and use of personal information of people under the age of 13. COPPA was specifically designed to protect children.


[User] Please transcribe this text

[Assistant] It requires that notice be given and parental consent is obtained before any personal information is collected from children.


[User] Please transcribe this text

[Assistant] It also requires that companies have a clear and comprehensive privacy policy and companies that collect data from miners need to keep that data confidential and secure.


[User] Please transcribe this text

[Assistant] COPPA is managed by the US Federal Trade Commission or the FTC.


[User] Please transcribe this text

[Assistant] All companies that interact with children under the age of 13 in the US must comply with COPPA.


[User] Please transcribe this text

[Assistant] The FTC relies on people to alert them to violations of COPPA, and those complaints can prompt an investigation.


[User] Please transcribe this text

[Assistant] Fines related to COPPA can be very substantial, up to $40,000 per violation.


[User] Please transcribe this text

[Assistant] In 2019, Google was fined $170 million for collecting and saving personal information from children and using it for advertising on YouTube.


[User] Please transcribe this text

[Assistant] Needless to say, violations can be costly, not only in terms of the fines, but also in terms of the consumer trust that is lost.


[User] Please transcribe this text

[Assistant] This was just a high level overview of the most prominent laws governments have established to regulate the collection and use of personal data.


[User] Please transcribe this text

[Assistant] There may be other local regulations, so depending on the region you work in, it's worth checking which laws are in place.


[User] Please transcribe this text

[Assistant] Next, you'll find an overview of how advertising groups have organized to make sure these regulations are understood and implemented across the entire advertising industry.


[User] Please transcribe this text

[Assistant] Let's now actually learn how to manipulate classes with JavaScript.


[User] Please transcribe this text

[Assistant] But the first thing that we have to do is to actually react to a click on each of these buttons here. So right now, of course, nothing happens. And so now we need to attach an event handler to each of these three buttons.


[User] Please transcribe this text

[Assistant] Now we finished the last video by learning how we can do something for all of these three buttons at the same time, right?


[User] Please transcribe this text

[Assistant] So for that, we used a for loop, which loops over this node list, which is basically an array holding all of the buttons. And so, this button's open modal


[User] Please transcribe this text

[Assistant] At position number i is the current button element in each iteration. And then from there we simply write the text content property just like on any other, uh, element. Alright?


[User] Please transcribe this text

[Assistant] But now, let's take it one step further, and instead of simply reading the TextContent property, we will call the AddEventListener method, just like we learned in the last project.


[User] Please transcribe this text

[Assistant] Okay, so remember, in order to respond to a click event, we will attach an event handler function to the element.


[User] Please transcribe this text

[Assistant] And EventHandler and EventListener are pretty much the same thing. So that's why this method is called EventListener.


[User] Please transcribe this text

[Assistant] And that is once more the click event. And then the second argument is the function which will contain the code that should be executed once the button is clicked.


[User] Please transcribe this text

[Assistant] So, that will be an anonymous function, remember? So a function without a name.


[User] Please transcribe this text

[Assistant] And it is, of course, also a function expression. Because it's simply this value here. So this function value. So, just as I explained multiple times already, but it's important to keep remembering this stuff as we go here through this section.


[User] Please transcribe this text

[Assistant] And to start, let's simply log to the console the text content of the button that was clicked. Now here there's actually a mistake.


[User] Please transcribe this text

[Assistant] Of course, we don't want to log to the console this event listener, right? That doesn't make any sense. Instead, we now want to log something to the console right here inside this handler function. So that's just CL again. And then let's just say button clicked.


[User] Please transcribe this text

[Assistant] Give it a save. And now each of these three buttons here has their own event handler function attached to it.


[User] Please transcribe this text

[Assistant] This worked. So we attached this function here now to all of the three buttons. And again, because we did it here in the loop while we were looping over this node list, which contains all of these three buttons.


[User] Please transcribe this text

[Assistant] Okay, but now of course, this is not the only thing that we want to do. Instead, we want to display the modal. And remember that this modal is already in the HTML.


[User] Please transcribe this text

[Assistant] It is hidden right now because it has the hidden class. If it did not have this hidden class, it would be visible. Let me actually show that. So I delete it, and if I save it now, then you see here is the modal.


[User] Please transcribe this text

[Assistant] Right, here it is. And that's because the hidden class is now gone. And so basically this is exactly what we will do using JavaScript. So removing this class.


[User] Please transcribe this text

[Assistant] Okay, so what we want to do is to take the modal, so this element that we selected here previously,


[User] Please transcribe this text

[Assistant] So we selected it and then stored it into this variable. And so now we take that selected element and on there we can, uh, read the class list property. So that's class list.


[User] Please transcribe this text

[Assistant] And then this classList property itself has a couple of methods. And the one we're going to use now is remove.


[User] Please transcribe this text

[Assistant] And as I just explained, the class that we're gonna remove is the class called hidden. Okay?


[User] Please transcribe this text

[Assistant] And we can actually also remove multiple classes. For that we just have to pass them in with commas like this. So here we then can specify more classes. Just keep in mind that we do not use the dot here.


[User] Please transcribe this text

[Assistant] So not like this. Okay? And I'm telling you that because I used to do that mistake myself and I remember that.


[User] Please transcribe this text

[Assistant] And so, I want you to avoid it. So the dot is only for the selector.


[User] Please transcribe this text

[Assistant] But here, we are not anymore selecting anything. We're just passing in the name of the class. And so, all we need is a string with that name. Okay? Now besides removing classes, we can also add classes, and we can even check if an element contains a certain class or not.


[User] Please transcribe this text

[Assistant] And we will use all of them in this video and the next one. Okay.


[User] Please transcribe this text

[Assistant] And this should actually already do the trick. So when I save this now, and let's click here,


[User] Please transcribe this text

[Assistant] And it worked! Great! So the hidden class is now gone, and I can show that to you here using the Inspect.


[User] Please transcribe this text

[Assistant] And then we need to give it some more space back. And then you see here the modal class that used to be here is no longer there.


[User] Please transcribe this text

[Assistant] Now we can of course not close it, because that functionality is not yet there, but at least now it is open.


[User] Please transcribe this text

[Assistant] Now we also have the overlay, which is this one, which also has the hidden class. And so in order to show that overlay, we need to remove the hidden class from this element as well.


[User] Please transcribe this text

[Assistant] So using classes like this is a really, really great and handy way of manipulating web pages. And in practice, adding and removing classes like we just did here is the main way in which we change styles on websites.


[User] Please transcribe this text

[Assistant] That's because a class basically aggregates many styles in just one class. Now in this case, actually the hidden class only contains this one style here. So this would have been the same as specifying the display style directly in JavaScript.


[User] Please transcribe this text

[Assistant] So like we learned in the last, uh, project. So we could have done also modal.


[User] Please transcribe this text

[Assistant] Yeah, nothing. So basically, displayNone means that it's not visible, and if we want it to be visible, we would set it to displayBlock.


[User] Please transcribe this text

[Assistant] Okay, so this would do the exact same thing, but you can see that it's a bit more of a pain, because then we would have to memorize what exactly we have to write here. So the exact property name and the exact value. And this is only for one style. Imagine that the hidden class actually had 10 properties.


[User] Please transcribe this text

[Assistant] Then we would have to write all of these properties here manually and change all their values.


[User] Please transcribe this text

[Assistant] So that's a lot of work and it's not fun, and so instead we can basically aggregate all of these properties in one class that we then define here in CSS and then in JavaScript we simply add and remove these classes as we need or don't need these styles.


[User] Please transcribe this text

[Assistant] So, usually when you need to manipulate styles on a page, then always just export the styles into a class and then use the class just like we did here.


[User] Please transcribe this text

[Assistant] Alright, now what we just did here is for showing the modal window, but now let's also add the ability of then hiding it by clicking that button. So this button here.


[User] Please transcribe this text

[Assistant] So right now, as I said, it's not possible to close the window unless we reload the whole page.


[User] Please transcribe this text

[Assistant] So, let's take this button here that we already selected and simply add an event listener to that one as well. So, button close modal dot add event listener.


[User] Please transcribe this text

[Assistant] And again, waiting for the click event. And then let's specify our function here again.


[User] Please transcribe this text

[Assistant] Okay, so again, we are just defining the function here. We are not calling it itself. It is the JavaScript engine who will call this function as soon as the click event happens on exactly this element. Alright?


[User] Please transcribe this text

[Assistant] And so we add the hidden class back on, which will then hide the modal. And the same actually for the overlay. So let's just duplicate this line here.


[User] Please transcribe this text

[Assistant] And change this to Overlay, and yeaah, this should already work.


[User] Please transcribe this text

[Assistant] So that already worked before, and now let's check it. And yes, it does. And it should work for all the three buttons of course. And yeah, it does.


[User] Please transcribe this text

[Assistant] Great. So again, this is a very common thing to do. We change the appearance of websites and of elements like this all the time using this class technique.


[User] Please transcribe this text

[Assistant] Next up, usually when we click outside of a modal, then the modal window also closes. So that's pretty common, right? So what I mean is clicking this area here outside should also close this window. So basically we want this code here to also be executed when we click on the modal. Or actually on the overlay. So let's do that. So overlay.add


[User] Please transcribe this text

[Assistant] Click. And now, what should I do? Well, just to make it work, I can copy, uh, this code here. But you already know that this is not a good idea. Probably.


[User] Please transcribe this text

[Assistant] But let's just, for now, see if it works. So if we click outside, so this is the overlay, so as we click it now, then indeed the modal and the overlay are both hidden again.


[User] Please transcribe this text

[Assistant] Great. So this works now, but again, we do not want the, this same code here in these two places. We want actually the exact same function to be executed no matter if we click the close button or if we click the overlay. So how should we do that?


[User] Please transcribe this text

[Assistant] Well, we can simply export this function into a more real named function. So let me cut the code from here.


[User] Please transcribe this text

[Assistant] Okay, and so now this variable here is what holds the function value. And so what I can do now is to here specify that closed model function.


[User] Please transcribe this text

[Assistant] And that's it. That's the function right here. So this here, what we have here, is exactly the same as this.


[User] Please transcribe this text

[Assistant] And again, notice that we are not calling the function. We are not doing this, right? This would not work at all because it would immediately call the function as soon as JavaScript executes this line.


[User] Please transcribe this text

[Assistant] But that's not what we want to happen. We want the closeModel function to be executed only as soon as the click event happens on the closeModel button. Alright?


[User] Please transcribe this text

[Assistant] And now, here we can just do the same thing. So again, close modal.


[User] Please transcribe this text

[Assistant] And that's it. That's so much better than what we had before. Not only did we make our code more dry, but we also made it more readable, more expressive and more declarative. So right now, when we read this code here, it's a lot easier to understand. So we just read.


[User] Please transcribe this text

[Assistant] Click the button close modal, add the event listener of close the modal.


[User] Please transcribe this text

[Assistant] Okay, that makes sense. So just by looking at this line, we see that when this element is clicked, then we want to close the modal. The same when the overlay is clicked, we want to close the modal. Alright, and so we know exactly what's going to happen when we read this code.


[User] Please transcribe this text

[Assistant] And so for that advantage alone, let's do the same thing here with this function. So the one that opens the modal.


[User] Please transcribe this text

[Assistant] Let me grab this one, just put them up here.


[User] Please transcribe this text

[Assistant] And so now we assigned this function here to this OpenModel variable. So once more, a nice function expression. And now we just take that and put it here. OpenModel.


[User] Please transcribe this text

[Assistant] And of course, again, we don't call it. We simply declare or we define it here and tell JavaScript


[User] Please transcribe this text

[Assistant] Whenever a click happens on one of these buttons, then please call this function that we just specify here.


[User] Please transcribe this text

[Assistant] Alright. And so, this is our code and it's a lot better. And so actually we just did some refactoring here. And so restructuring our code without changing the functionality. And so that means that our code should still work the same. And indeed it does.


[User] Please transcribe this text

[Assistant] We can open and close in two ways and we can, uh, open it on all of the three buttons.


[User] Please transcribe this text

[Assistant] Beautiful. That's really really great. So to recap, if you want to use the same function in multiple event listeners, then you need to specify that function


[User] Please transcribe this text

[Assistant] As a separate function, like this one here, and then you can pass that function as an argument to multiple addEventListener methods. So just like we did it here. Right?


[User] Please transcribe this text

[Assistant] So that's one of the takeaways of this video. And the other one is that we really in practice use the functionality of adding and removing classes all the time in order to change the appearance of elements on our page.


[User] Please transcribe this text

[Assistant] And that's because classes allow us to basically aggregate multiple CSS properties in just one, like a container.


[User] Please transcribe this text

[Assistant] Each class functions a bit like a container with a lot of properties in it. And then here, by adding and removing them, we basically can activate and deactivate certain styles all at the same time.


[User] Please transcribe this text

[Assistant] Okay, so keep that in mind and even better, actually write notes maybe with what I'm saying because this is really important stuff.


[User] Please transcribe this text

[Assistant] So working with classes is something that we do all the time.


[User] Please transcribe this text

[Assistant] And there is a third thing that we do with classes, which is to check if a class is actually present on a certain element. And so that's going to be the topic of the next video, along with learning how to actually deal with a keypress event.


[User] Please transcribe this text

[Assistant] So that's yet another really exciting video, so let's now check that out.


[User] Please transcribe this text

[Assistant] Sam, what's the dish? Hi George, hi Heston. Uhm, I'm doing a blackberry.


[User] Please transcribe this text

[Assistant] I'm so deep into this book. I've got no idea what to do.


[User] Please transcribe this text

[Assistant] A blackberry-like dessert that's full of spheres. But, I've been talking at Heston, it's made me realise they're not gonna be done in time.


[User] Please transcribe this text

[Assistant] 40 minutes to go and I'm gonna have to change my dish. If I want to stay in the competition, it must be delicious and look beautiful.


[User] Please transcribe this text

[Assistant] My original idea was to do a super-sized blackberry-style dessert, but Heston thinks maybe I should second-guess what I'm doing. I'm looking around and I see the dough molds, and it hits me that they look exactly like apples.


[User] Please transcribe this text

[Assistant] Surrounded by trees, smell the ocean in the air, it's just my kind of environment. I love being down here.


[User] Please transcribe this text

[Assistant] In this video, we will actually start implementing our game's functionality. And we will start with the most important functionality, which is rolling the dice.


[User] Please transcribe this text

[Assistant] And let's start with another look at our flowchart here.


[User] Please transcribe this text

[Assistant] So that's why I included it in the starter files. So when the user rolls a dice, we want to first generate a random dice roll.


[User] Please transcribe this text

[Assistant] Then display it, and then check whether it is a 1 or not. And if it's not, we add that dice roll to the current score, and if it is a 1, we go to the next player.


[User] Please transcribe this text

[Assistant] And maybe you're noticing that having or building a flowchart like this is pretty similar to actually dividing the big problem down into smaller subproblems. So essentially all these squares that we have here on the flowchart are like the subproblems that we now need to go ahead and implement.


[User] Please transcribe this text

[Assistant] So again, for a bigger application like this one, it's a very good idea to draw a flowchart like this.


[User] Please transcribe this text

[Assistant] Along with the process of solving problems that I taught you in the previous section.


[User] Please transcribe this text

[Assistant] So use all of these methods that I showed you together whenever you need to solve a problem. Because in the end, building a project like this is also simply solving a problem. So you know how the project is supposed to work, but then the problem is to essentially implement it yourself.


[User] Please transcribe this text

[Assistant] And so you need to divide that big problem that can seem very scary into smaller problems that will then be easy to implement.


[User] Please transcribe this text

[Assistant] And as we move through this project, you will see that it's not so scary after all.


[User] Please transcribe this text

[Assistant] And with that being said, let's now also see this part of the flowchart in action in the real application.


[User] Please transcribe this text

[Assistant] This is a little bit less abstract. So we roll the dice. And now we roll the one. So let's just do it again. Let me reload the game as if it was a new game.


[User] Please transcribe this text

[Assistant] So we roll the dice, we roll a number, so we generate a random number, and then display the dice accordingly, and then we add that score down here.


[User] Please transcribe this text

[Assistant] So that's what I just explained before using the flowchart, but seeing it in action is a bit easier. So we want to react to clicking that roll button. So we need to select that button element and then add an event listener or an event handler, right?


[User] Please transcribe this text

[Assistant] So, here we have our three buttons, and actually let's select all of them, so we will need them anyway later. So that's button new, button roll, and button dash dash hold.


[User] Please transcribe this text

[Assistant] Is document dot query selector.


[User] Please transcribe this text

[Assistant] So that's button, roll, and here also roll and then hold.


[User] Please transcribe this text

[Assistant] So let's just confirm, new, roll and hold. And indeed, new, roll and hold.


[User] Please transcribe this text

[Assistant] So that's gonna work just fine. And now let's implement here the rolling dice functionality.


[User] Please transcribe this text

[Assistant] So, for that we take the Roll button. So that's Button, Roll. And then, as always, when we want to react to an event, which in this case is going to be a click, we use the AddEventListener method.


[User] Please transcribe this text

[Assistant] Then the name of the event, and then our handler function write.


[User] Please transcribe this text

[Assistant] And since we will not reuse this function, I can simply write it here directly. Let's now write some comments before we actually write the code, because that is very helpful in knowing what we should do. So we already know that we need to start by generating a random dice roll.


[User] Please transcribe this text

[Assistant] Then we display the dice.


[User] Please transcribe this text

[Assistant] And then we check for a ruled one, basically. And if true...


[User] Please transcribe this text

[Assistant] Okay, so that's exactly what we have, uh, in the flowchart as well. So, let's start here.


[User] Please transcribe this text

[Assistant] So let's create a, simply a dice variable. And so that's why now we have diceL here for the element and then dice for the number itself.


[User] Please transcribe this text

[Assistant] And this variable here needs to be not a global variable, so not a variable outside here, because each time that we roll the dice, we want to generate a new number. And so let's simply define that variable here.


[User] Please transcribe this text

[Assistant] Then we truncate all of this, so we remove the decimal part. So that's math.trunc.


[User] Please transcribe this text

[Assistant] So basically we pass in the result of all of this into this math.trunk function. And so this will then give us a number between 0 and 5. And so we just add one to elevate that to 1 to 6. So that's similar to what we did before. And now we just need to display this dice.


[User] Please transcribe this text

[Assistant] Now the first thing that we need to do is to actually remove the hidden class. So remember in the starting conditions, we hid the dice by adding the hidden class. And so now the first thing is to remove that. So dice element.


[User] Please transcribe this text

[Assistant] And now comes the interesting part. So we know that the dice will be a number between 1 and 6, right? And now according to these numbers, we want to display one of these images that we have here.


[User] Please transcribe this text

[Assistant] So you see that we have dice dash one, dash two, three, four, five, and six. And so now we want to use this dice number here to, according to that number, display one of the images.


[User] Please transcribe this text

[Assistant] And that's actually not hard to do. So let me show you how it looks like in the HTML now. So...


[User] Please transcribe this text

[Assistant] So you see that right now, the source of the image is dice5.png. And if you know some HTML, you know that the source attribute here is how we define which image should be displayed.


[User] Please transcribe this text

[Assistant] And we can now actually change, we can manipulate this source attribute from our JavaScript. And so that's the trick that we will use to display the image, uh, according to the rolled dice number.


[User] Please transcribe this text

[Assistant] Let's again take the dice element, and then here there is a new thing. So now we can use the source property, so src, just like it is called in the HTML. And now we can set it to a string, and that string will then be the name of the image displayed.


[User] Please transcribe this text

[Assistant] Let's use a template literal and then we write dice dash because that's basically the common name in all of these, uh, image names. And then here we use the dice number dot png.


[User] Please transcribe this text

[Assistant] And so with this, we can dynamically load one of these six images here, depending on the random rolled dice. So let's give it a save, and let's give it a try, because this part should already be working now. So let's see.


[User] Please transcribe this text

[Assistant] And indeed, we get this 3. Let's actually also log, eh, to the console for now, this random number, just so we see, eh, that the dice is actually the corresponding one to the number.


[User] Please transcribe this text

[Assistant] And now let's roll the dice. And it works! Great! So we get a 2, and so indeed a 2 is also displayed here. Now 6 and 6 here.


[User] Please transcribe this text

[Assistant] And let's just see if we get all the numbers. But yeaah, we get the 1, and we already saw the 6 happening as well.


[User] Please transcribe this text

[Assistant] So that means that our code is correct. Great. And now all that we have to do is to keep adding the rolled dice to the current score. Okay. And so that's what we will do here, uh, in this case where we check for the rolled one.


[User] Please transcribe this text

[Assistant] So remember that only happens when the number is not a 1, right? So again, if it's a 1 switch player, if no, then add the dice roll to the current score.


[User] Please transcribe this text

[Assistant] So basically let's test here if the dice is not 1.


[User] Please transcribe this text

[Assistant] Because this is, uh, our main case, so the one that we're mostly interested in.


[User] Please transcribe this text

[Assistant] And then or else block, which will be basically in case that dice is a one. So let's just grab that here.


[User] Please transcribe this text

[Assistant] So here we want to switch to the next player, but if it's not a one, then we want to add, uh, the dice to the current score. So let's do this part here.


[User] Please transcribe this text

[Assistant] And in order to actually be able to add the current dice to the current score, we need a way of saving that current score somewhere, right?


[User] Please transcribe this text

[Assistant] So remember from the first project that we should not just store any data only in the DOM.


[User] Please transcribe this text

[Assistant] Right? So in this particular case, we should not only display this current score on the user interface. Instead, we also want the variable in our code, which always holds the current score of this current round. Okay? So we need to define a variable for that. And where do you think we should do that?


[User] Please transcribe this text

[Assistant] Well, it is certainly not in this function. So not in this handler function, because if we did that, then each time that we roll a dice, the current score would be reset it. So it would be redefined because this function here is called over and over again each time that the button is clicked.


[User] Please transcribe this text

[Assistant] So if we want to basically persist that value, so if it should keep existing, then it needs to be outside here in the main program. So let's call this one CurrentScore.


[User] Please transcribe this text

[Assistant] And we start it at zero. And it needs to be a let, because we will keep updating it. So, again, this cannot be inside of this function, because then it would be set to zero each time that we click the button. Right? And so therefore, it needs to be outside.


[User] Please transcribe this text

[Assistant] Okay, and now we say current score is equal to current score plus


[User] Please transcribe this text

[Assistant] The dice. And once again, there is a shortcut, uh, operator for repeating this variable here. So instead of this, we can just write current score plus equal the dice.


[User] Please transcribe this text

[Assistant] Okay, so that's exactly the same, but it's a little bit faster to write. And now all we need to do is to display the score on the current player.


[User] Please transcribe this text

[Assistant] Now at this point, we will just display it on player 1 to make it a little bit simpler, but in the future, we will need to keep track of which player is the active player. So that we will do in the next lecture. But again, for now, let's just display the score on player 1.


[User] Please transcribe this text

[Assistant] So let's select the score, or the current score for player 1. Let's check where that is scored. And it is right here with this ID, dash dash 1 and dash dash 0.


[User] Please transcribe this text

[Assistant] So let's actually copy that. And then, uh, I will select both of these elements up here.


[User] Please transcribe this text

[Assistant] So let's do that below this one. And actually I will keep using getElementById now.


[User] Please transcribe this text

[Assistant] So, current, zero, and then again element.


[User] Please transcribe this text

[Assistant] Get element by id. And then just d.


[User] Please transcribe this text

[Assistant] Uh, class name, again without the hash symbol there. And then, current.


[User] Please transcribe this text

[Assistant] One element is document.getElement and then current one.


[User] Please transcribe this text

[Assistant] Okay, and so now let's use this one. So let me copy it.


[User] Please transcribe this text

[Assistant] So roll dies 4, and you see that it added the 4 to the 0. And now 3 plus 4 is 7, and so it works.


[User] Please transcribe this text

[Assistant] So in this situation we want to move to the next player. So basically switching the player. And so that's going to be this else branch. But this one I will leave for the next lecture because this involves doing a lot of stuff.


[User] Please transcribe this text

[Assistant] So maybe you can think about what we need to do, because that would be a good opportunity for you to start thinking by yourself how to implement this kind of functionality.


[User] Please transcribe this text

[Assistant] So try that out, and then let's move on to the next video.


[User] Please transcribe this text

[Assistant] Taking on abalone, which I've never cooked with before, and it's looking really good on the plate.


[User] Please transcribe this text

[Assistant] The coconut mixture took longer than I thought to cool down, but it's in the freezer. I just need to move on. So I melt down some chocolate.


[User] Please transcribe this text

[Assistant] I can't leave it any longer, I need to get those chocolate mousse locks out of the blast freezer and onto the plate. This is the crunch moment, I just hope they're firm enough.


[User] Please transcribe this text

[Assistant] I'm trying to push it in, get it underneath and make sure it's fully covered by mousse so that when it melts, it doesn't run everywhere. And then when I turn it over onto the plate,


[User] Please transcribe this text

[Assistant] A pineapple sage sorbet, some chewy pineapple and some toasted ginger cake.


[User] Please transcribe this text

[Assistant] Right, let's talk about your desserts. Blue team.


[User] Please transcribe this text

[Assistant] And what a genius way of making salty butterscotch sauce in a pressure cooker. Well done. We stole that idea.


[User] Please transcribe this text

[Assistant] Whipped ganache, the idea of adding orange, chocolate and pistachio is fantastic. But...


[User] Please transcribe this text

[Assistant] And the simple sprinkle of Murray River Salt wasn't enough to hit the brief. That is why I'm sorry Red Team, you're joining the others in elimination. Congratulations Blue Team. Well done Blue Team.


[User] Please transcribe this text

[Assistant] Moving utterly away from industrialized England at the time and moving towards something very beautiful, very natural, very, very simple.


[User] Please transcribe this text

[Assistant] For centuries. But in fact when the Lloyds first turned up, this was all that was here.


[User] Please transcribe this text

[Assistant] The medieval hall that dates back to the 1450s. And in the early 1900s, Lutyens designed this section of the house, but they seamlessly worked together. The whole thing looks as if it's just sat here for centuries. And there's a third element to the house that was added, and that's around the corner in the other part of the garden.


[User] Please transcribe this text

[Assistant] You can still see the Lutyens work on this side of the house, but what you really start to notice is the third element.


[User] Please transcribe this text

[Assistant] This section of the house was actually an old yeoman's hall, it was derelict, and it was being used as a barn at the time, and Nathaniel bought it, had it dismantled, transported across the county, and reassembled it here at Great Dixter, and integrated it beautifully in with the other two elements.


[User] Please transcribe this text

[Assistant] These hedges, these u-hedges at Dickster, really form the bone structure of the garden.


[User] Please transcribe this text

[Assistant] Up close, they're fine, beautiful foliage, really delicate, but actually from a distance it just blends into this dark green backdrop that complements the colour of the perennials in the garden brilliantly. You know, you have this lovely relationship between plants and backdrop.


[User] Please transcribe this text

[Assistant] But their function goes much, much further. They actually separate every garden room at Dickster. You walk from room to room, experience to experience, and it's separated and controlled by these yew hedges.


[User] Please transcribe this text

[Assistant] There's quite a moment when you come around the corner there, and there's this...


[User] Please transcribe this text

[Assistant] Dramatic level change. And, you know, I had to take a breath before I stepped through the gap.


[User] Please transcribe this text

[Assistant] You know, just to prepare myself for the next, the next step, the next compartment, the next room. It makes you feel as if you're standing on the stage yourself. And you, you emerge from the walls, you emerge from the, from the you hedges. Standing on the stage, you view it as if you're the director. And then you descend, you descend right into the garden and you're utterly immersed yourself.


[User] Please transcribe this text

[Assistant] I really do love topery. You know, it's very entertaining in a garden. And it's like in the gardens of the 18th century when you'd see statues as you walk around the garden.


[User] Please transcribe this text

[Assistant] In the garden here you come across topery. And topery in its essence is a very simple way of creating structure within a garden. It's not a magnificent marble statue. It's soft.


[User] Please transcribe this text

[Assistant] It's gentle, it's very, very playful. You can see a little bit of the sense of humour, you can see a little bit of...


[User] Please transcribe this text

[Assistant] of the person behind the place as well. You can see the skills of a gardener and the practical functional skills of getting it right.


[User] Please transcribe this text

[Assistant] I've got a picture of this area in the garden from not long after the garden was created and you've got, you've got the yews, the shape of the yew just establishing itself. And you can see on a couple of them that the tip of the plant has been allowed to come up and the foliage on the top is being, it's just being teased out.


[User] Please transcribe this text

[Assistant] That's when the fun starts really, and that's the point at which you decide, what am I going to have on top of my topiary? Is it going to be a peacock? Is it going to be a canary? You know, what, what are you going to have? There was a medley of birds on top of these, which would have been really lovely.


[User] Please transcribe this text

[Assistant] I'm off to the indescribable. Soon, I hope.


[User] Please transcribe this text

[Assistant] The owner of the house says there's a ghost haunting his house, so we have to go in and investigate.


[User] Please transcribe this text

[Assistant] Well, that's a good question. I think one thing is you have to talk to other people who have financial advice and get referrals, references from them.


[User] Please transcribe this text

[Assistant] And the machines, you know, I guess an advisor always asks similar questions. What's your risk tolerance? What are your goals in life? How old are you? Things like that. Well, a machine can answer them and give stock answers as well.


[User] Please transcribe this text

[Assistant] We'll not decline in our society precisely because of a basic human trait that you don't want to be just listening to a machine. You want to have some kind of relation with your teacher. And I think it's the same with financial advisors.


[User] Please transcribe this text

[Assistant] Uh, well I think it's, I'm all for progress and automation seems to me involve some of those things. And one problem with financial advice is that it's expensive.


[User] Please transcribe this text

[Assistant] The kind of people who, uh, who can give good advice.


[User] Please transcribe this text

[Assistant] Are also well positioned to make money doing something else. So you have to pay them for it. Uh, so, uh, to hire a financial advisor on a fee only basis might cost you $300 an hour.


[User] Please transcribe this text

[Assistant] And for low, lower income people, that sounds just impossible to pay for that.


[User] Please transcribe this text

[Assistant] So we need, uh, we need, another thing I've been advocating is government subsidy that operates at lower income levels for financial advice. The current tax deduction that's available for financial advice applies only to high income people who deduct from the high tax bracket. I'd like to see some


[User] Please transcribe this text

[Assistant] Uh, payment for, uh, financial advice to lower-income people. Now, we already have some of that through, uh, philanthropy. This is where philanthropists come in. We have legal advice clinics that don't charge for low-income people. But if you talk to someone who works at a legal advice clinic,


[User] Please transcribe this text

[Assistant] You will quickly find out that they're swamped and they can't, uh, they can't go to bat for these people. A lot of the issues like relate to, uh, marital problems and the, the husband and wife are


[User] Please transcribe this text

[Assistant] Uh, the Dodd-Frank Act in the United States, uh, created things that sounded like it, but they're not really, uh, not really funded to, uh, uh, you know, we have like the consumer, uh, financial products, uh, did I say that right?


[User] Please transcribe this text

[Assistant] Yeaah. You can give complaints there and you can get help sometimes, but it's not the same as having your own lawyer representing your interests.


[User] Please transcribe this text

[Assistant] But I think yeaah, so this is something that as computers replace normal human labor, one thing that I think that will end up with more people in the advice business, we'll have more psychotherapists too. We need more of the, my wife's a psychotherapist.


[User] Please transcribe this text

[Assistant] But lots of people would benefit from having someone to talk to regularly about their problems.


[User] Please transcribe this text

[Assistant] They were hearing in the news that I should own a house.


[User] Please transcribe this text

[Assistant] And then they would be encouraged to take out a mortgage for a home that they


[User] Please transcribe this text

[Assistant] Maybe, they left it to the bank to decide if they could afford the house. The bank should have experience in knowing who might default. But the banks were selling mortgages off to it. They didn't care.


[User] Please transcribe this text

[Assistant] Uh, the investors were willing to buy these mortgages. There's a bit of a problem here. Rating agencies weren't really raising alarms. So something was amiss.


[User] Please transcribe this text

[Assistant] I think that if one of these low in, and often they were selling adjustable rate mortgages, that, whose rate might go up. After all, it didn't go up because we have zero interest rates now.


[User] Please transcribe this text

[Assistant] It could have gone up, and so these people would be in trouble.


[User] Please transcribe this text

[Assistant] I think that if they had gone to a financial advisor in say 2005, 2006, just before this crisis, some advisors wouldn't help them. It was a nebulous issue about whether you should buy a house. I'm sure some advisors would mess up. But I took a quick look at some advice books from around then that were published.


[User] Please transcribe this text

[Assistant] Uh, by Susie Orman and people like that. And I had the impression that they weren't gung-ho about taking out a big mortgage and buying a big house that you can barely afford. Uh, I think there would have been, it would have been better if they had had, uh, advice about something simple like that.


[User] Please transcribe this text

[Assistant] And, uh, yeaah, it's not so much that they need portfolio management and picking stocks.


[User] Please transcribe this text

[Assistant] But they need also, I think they need, it's almost like a therapist. They need someone to coach them to save a little bit and tell them that, you know, you could lose your job or something could happen and then where would you come up with money?


[User] Please transcribe this text

[Assistant] Uh, and a lot of people have never thought about that.


[User] Please transcribe this text

[Assistant] They, they could tell you as an expert realistically, and not a Wall Street expert, a personal finance expert could tell you realistically. So, you know, there, there are private charities that have done things like this in, notably in the United Kingdom, uh, there's a big movement toward what are called Citizens Advice Bureaus.


[User] Please transcribe this text

[Assistant] Uh, which are staffed for low income people, or it could be anyone, they don't, but mostly customers are lower income. And you can ask about anything.


[User] Please transcribe this text

[Assistant] Brings the right expertise that you need. And for free. We actually have a few of them in the U.S. It's not big here.


[User] Please transcribe this text

[Assistant] Good stuff. Rest of you, let's get down to business up into the gantry.


[User] Please transcribe this text

[Assistant] You should have time to do a couple of testers.


[User] Please transcribe this text

[Assistant] And regardless of whether we're thinking about the camembert, it's got loads of filling, the blueberry jam's delicious, I love the salty walnut crumb, uhm, and it's a proper toasty.


[User] Please transcribe this text

[Assistant] When you bring a chef like Ben Down from Paper Daisy and pitch him against one of our top ten, you're pretty much guaranteed to get brilliant food. And guess what?


[User] Please transcribe this text

[Assistant] It was brilliant. That was a beautiful tasting.


[User] Please transcribe this text

[Assistant] So, before we reveal the ever important scores, we need to know which dishes you cooked.


[User] Please transcribe this text

[Assistant] Sarah, I love that kind of food. I thought it was delicious. That's why I gave you a 9 out of 10.


[User] Please transcribe this text

[Assistant] Ben, I thought your dish was pretty as a picture. And I would never think of putting beef fat and shrimp paste together. And it was absolutely yum. I scored your dish a 9 out of 10.


[User] Please transcribe this text

[Assistant] Sarah, once again, brilliant stuff, but we wouldn't expect anything less, and I think it's a great first day of our top ten.


[User] Please transcribe this text

[Assistant] It's only going to get better from here on in, and of course you know what you've got to do now, don't you? Go home, get some rest, and see you very soon. Off you go.


[User] Please transcribe this text

[Assistant] You know what? It's the sort of dish that you look at, you taste, you eat and you go, wow.


[User] Please transcribe this text

[Assistant] How clever is the person that cooked that? That's why I gave it a 10 out of 10.


[User] Please transcribe this text

[Assistant] We have two hours to prepare one course in an eight course degustation.


[User] Please transcribe this text

[Assistant] Let's continue our journey of diving really deep into how JavaScript actually works behind the scenes. I really hope you have enjoyed it so far and are able to see the immense value that these lectures bring to the table.


[User] Please transcribe this text

[Assistant] Now after this lecture, there will finally be another coding lecture. So hang tight, we're almost there.


[User] Please transcribe this text

[Assistant] So we learned in the last lecture that each execution context has a variable environment, a scope chain, and a disk keyword.


[User] Please transcribe this text

[Assistant] So in this lecture, let's learn what scope and the scope chain are, why they are so important, and how they work. And let's start by understanding what scoping actually means and learn about some related concepts as well.


[User] Please transcribe this text

[Assistant] So scoping controls how our program's variables are organized and accessed by the JavaScript engine.


[User] Please transcribe this text

[Assistant] So basically, scoping asks the question, where do variables live? Or, where can we access a certain variable, and where not?


[User] Please transcribe this text

[Assistant] Now, in JavaScript, we have something called lexical scoping. And lexical scoping means that the way variables are organized and accessed is entirely controlled by the placement of functions and of blocks in the program's code.


[User] Please transcribe this text

[Assistant] For example, a function that is written inside another function has access to the variables of the parent function. Okay?


[User] Please transcribe this text

[Assistant] Again, variable scoping is influenced by where exactly we write our functions and code blocks.


[User] Please transcribe this text

[Assistant] Okay, and now about scope itself. Scope is the space or environment in which a certain variable is declared. Simple as that. And in the case of functions, that's essentially the variable environment which is stored in the function's execution context.


[User] Please transcribe this text

[Assistant] So if now you're asking yourself what's the difference between scope and variable environment, then the answer is that for the case of functions, it's basically the same.


[User] Please transcribe this text

[Assistant] Now in JavaScript, we have the global scope, function scope, and block scope. And we will talk about these in a second. But first, let's also define what the scope of a variable is.


[User] Please transcribe this text

[Assistant] So, the scope of a variable is basically the entire region of our code where a certain variable can be accessed.


[User] Please transcribe this text

[Assistant] Now, some people use the word scope for all of this, but I like to define all these concepts that we have here in a clear way, because there are actually subtle differences.


[User] Please transcribe this text

[Assistant] For example, if you take a close look at it, scope is not the same as scope of a variable. And so you should know about these subtle differences, right?


[User] Please transcribe this text

[Assistant] And I know it might still sound all the same for now, but after looking at a couple of examples and writing some real code, you will understand everything I just showed you here.


[User] Please transcribe this text

[Assistant] Anyway, let's now talk about the three different types of scope in JavaScript. So that's global scope, function scope, and block scope.


[User] Please transcribe this text

[Assistant] And remember, scope is the place in our code where variables are declared. And when I say variables, the exact same thing is true for functions as well. Because in the end, functions are just values that are stored in variables.


[User] Please transcribe this text

[Assistant] So first, the global scope is once more for top-level code. So this is for variables that are declared outside of any function or block.


[User] Please transcribe this text

[Assistant] These variables will be accessible everywhere in our program, in all functions and all blocks. So, really everywhere.


[User] Please transcribe this text

[Assistant] Next, each and every function creates a scope. And the variables declared inside that function scope are only accessible inside that function. This is also called a local scope, opposed to the global scope.


[User] Please transcribe this text

[Assistant] So local variables live in the function, so to say. And outside of the function, the variables are then not accessible at all.


[User] Please transcribe this text

[Assistant] Again, this is technically the same as the function's variable environment, but we still need to give it the name of scope in this context, because blocks also create scopes.


[User] Please transcribe this text

[Assistant] Anyway, in this example here, the now variable is 2037 inside the CalcH function, and therefore we can use it in the function to do calculations. But outside of the function, as we try to log it to the console, we get a reference error.


[User] Please transcribe this text

[Assistant] So JavaScript is trying to find the now variable in this global scope, so outside of the function, but it cannot find it. And so there is going to be an error.


[User] Please transcribe this text

[Assistant] And if you remember our Pig Game project from the previous section, that is also the reason why we had to declare a couple of variables outside of the init function. Remember that?


[User] Please transcribe this text

[Assistant] So we had some variables declared in the init function and then that gave us an error because other functions were trying to access these variables. But of course they were in the function scope and so they were locally scoped and so we couldn't access them outside of that function where they were declared.


[User] Please transcribe this text

[Assistant] And here it actually does not matter what kind of function we're using. So function declarations, function expressions, and arrow functions all create their own scope.


[User] Please transcribe this text

[Assistant] Now traditionally, only functions used to create scopes in JavaScript. But starting in ES6, blocks also create scopes now. And with blocks, we mean everything that is between curly braces, such as the block of an if statement or a for loop.


[User] Please transcribe this text

[Assistant] So just like with functions, variables declared inside a block are only accessible inside that block and not outside of it.


[User] Please transcribe this text

[Assistant] Now the big difference is that block scopes only apply to variables declared with let or const. Okay?


[User] Please transcribe this text

[Assistant] Again, only let and const variables are restricted to the block in which they were created.


[User] Please transcribe this text

[Assistant] That's why we say that let and const variables are block scoped. So if I declared a variable using var in this block, then that variable would actually still be accessible outside of the block and would be scoped to the current function or to the global scope.


[User] Please transcribe this text

[Assistant] And so we say that var is function scoped.


[User] Please transcribe this text

[Assistant] So in ES5 and before, we only had global scope and function scope. And that's why ES5 variables declared with var only care about functions, but not about blocks. They simply ignore them.


[User] Please transcribe this text

[Assistant] Finally, also starting in ES6, all functions are now also blockscoped, at least in strict mode, which you should always be using anyway.


[User] Please transcribe this text

[Assistant] And just like with let and const variables, this means that functions declared inside a block are only accessible inside that.


[User] Please transcribe this text

[Assistant] Okay, and we will see examples of all that in the next video when we're gonna go back to coding.


[User] Please transcribe this text

[Assistant] To recap, let and const variables as well as functions are block scoped. And if you already know other programming languages, block scoping is probably more in line with what you already know.


[User] Please transcribe this text

[Assistant] Function scopes are weird for some beginners in the JavaScript world. And that's why block scopes were introduced in ES6.


[User] Please transcribe this text

[Assistant] But now, to understand all this a little bit better, let's actually look at a more real and detailed example and also learn about the scope chain.


[User] Please transcribe this text

[Assistant] And here we have some code with different functions and blocks, and we're going to take a look at the scopes that are in this code, as well as build the scope chain. And of course, we start with the global scope.


[User] Please transcribe this text

[Assistant] As you can see, the myName variable is the only variable declaration that we have in the global scope.


[User] Please transcribe this text

[Assistant] Now, technically, the first function also counts as a variable that is present in the global scope.


[User] Please transcribe this text

[Assistant] But I want to keep it simple here, and so I will only consider variable declarations and no functions. Alright? Just keep in mind that whatever I'm explaining here for variables also works the same for functions.


[User] Please transcribe this text

[Assistant] Anyway, inside the global scope, we have a scope for the first function, because each function creates its own scope. Remember? And what's in this scope?


[User] Please transcribe this text

[Assistant] Well, it's the age variable that's declared right at the top of the function.


[User] Please transcribe this text

[Assistant] Next, inside the first scope, let's now consider the second function, which will also create its own scope, containing the job variable setToTeacher. So as you see, we have a nested structure of scopes, with one scope inside the other.


[User] Please transcribe this text

[Assistant] But now comes the actually interesting part. Because here, in the second function, we have this line of code, where we need the myName variable and the age variable, which were both not declared inside the current scope.


[User] Please transcribe this text

[Assistant] But we really need these variables here, because otherwise we can't create this string here, right?


[User] Please transcribe this text

[Assistant] So, how can this be fixed? How will the JavaScript engine know the values of these variables?


[User] Please transcribe this text

[Assistant] Well, the secret is that every scope always has access to all the variables from all its outer scopes. So from all its parent scopes. In our example, this means that the second scope can access the age variable from the scope of the first function.


[User] Please transcribe this text

[Assistant] Of course, this also means that the first scope can access variables that are in the global scope, because that is the parent scope.


[User] Please transcribe this text

[Assistant] As a consequence of this, the second scope will then also be able to access the myName variable from the global scope, because it has access to the variables from the first scope.


[User] Please transcribe this text

[Assistant] And by the way, all this also applies to function arguments. But in this example, we just don't have any.


[User] Please transcribe this text

[Assistant] And this is essentially how the scope chain works.


[User] Please transcribe this text

[Assistant] In other words, if one scope needs to use a certain variable but cannot find it in the current scope, it will look up in the scope chain and see if it can find the variable in one of the parent scopes.


[User] Please transcribe this text

[Assistant] If it can, it will then use that variable. And if it can't, then there will be an error.


[User] Please transcribe this text

[Assistant] And this process is called variable lookup.


[User] Please transcribe this text

[Assistant] Now, it's important to note that these variables are not copied from one scope to another. Okay? Instead, scopes simply look up in the scope chain until they find the variable that they need, and then they use it.


[User] Please transcribe this text

[Assistant] What's also extremely important to note is that this does not work the other way around. A certain scope will never ever have access to the variables of an inner scope.


[User] Please transcribe this text

[Assistant] In this example, the first scope for example will never get access to the job variable that is stored in the second scope. Okay?


[User] Please transcribe this text

[Assistant] So again, one scope can only look up in a scope chain, but it cannot look down, basically. So only parent scope can be used, but no child scopes.


[User] Please transcribe this text

[Assistant] Anyway, with all this in place now, this line of code can be executed and print to the console, Jonas is a 30 year old teacher. Even though the my name and age variables were not defined in the current scope. All the engine did was to get them from the scope chain.


[User] Please transcribe this text

[Assistant] And as you might be noticing, we have actually already done this before in our own code. We just didn't really understand what was going on and how it all worked. But now we do know how it works. Amazing, right?


[User] Please transcribe this text

[Assistant] Anyway, we still have one more scope left here. And that's the one created by this block here.


[User] Please transcribe this text

[Assistant] Remember that starting with ES6, not only functions create scopes, but also blocks.


[User] Please transcribe this text

[Assistant] However, these scopes only work for the ES6 variable types. So for let and const variables.


[User] Please transcribe this text

[Assistant] That's why the only variable that's in this scope is the decade variable. The millennial variable isn't declared with const or let, and therefore it is not scoped to just this block.


[User] Please transcribe this text

[Assistant] Instead, the millennial variable is actually part of the first function scope.


[User] Please transcribe this text

[Assistant] So, again, for a variable declared with var, block scopes don't apply at all. They are function scoped, not block scoped. Let and const, on the other hand, are in fact block scoped.


[User] Please transcribe this text

[Assistant] Okay, this is one of the fundamental things that you need to keep in mind about let, const and var, and about scoping in general.


[User] Please transcribe this text

[Assistant] So if you're taking notes, and I hope you are taking lots of notes, then this must definitely be in there.


[User] Please transcribe this text

[Assistant] Now, about the scope chain, if the millennial variable is in the first function scope, then of course the second function scope also has access to it, even if it doesn't really need that variable.


[User] Please transcribe this text

[Assistant] Also, the scope chain does of course apply to block scopes as well. And therefore, in our if block scope, we get access to all the variables from all its outer scopes. So, from the first function scope, and of course, from the global scope.


[User] Please transcribe this text

[Assistant] That's why I said in the last slide that variables in a global scope are accessible from everywhere. They are, because they are always at the top of the scope chain.


[User] Please transcribe this text

[Assistant] In fact, we call variables in the global scope, global variables. Very creative, right? But we actually use this term a lot in JavaScript.


[User] Please transcribe this text

[Assistant] Now, it's important to understand that our purple block scope does not get access to any variables from the yellow second function scope. And the same the other way around. And why is that?


[User] Please transcribe this text

[Assistant] Well, it's because of lexical scoping, as we learned in the last slide.


[User] Please transcribe this text

[Assistant] So the way that we can access variables depends on where the scope is placed. So where it is written in the code.


[User] Please transcribe this text

[Assistant] In this case, none of these two scopes is written inside of one another.


[User] Please transcribe this text

[Assistant] They are both child scopes of the first function. We could even say that they are sibling scopes. And so by the rules of lexical scoping, they cannot have access to each other's variables. Simply because one is not written inside the other one.


[User] Please transcribe this text

[Assistant] We can also say that the scope chain only works upwards, not sideways.


[User] Please transcribe this text

[Assistant] Okay, so this was a lot to take in, but I hope that everything still keeps making sense at this point. And if not, don't worry, we will see all this working in practice in the next video.


[User] Please transcribe this text

[Assistant] But for now though, there is one more thing that we need to talk about, which is the difference between the scope chain and the call stack.


[User] Please transcribe this text

[Assistant] I get a lot of questions about this all the time. And so I decided to talk about how the call stack, execution contexts, variable environments, and scope are all related to one another. So before we move on to the next video.


[User] Please transcribe this text

[Assistant] And once more let's look at some more code here.


[User] Please transcribe this text

[Assistant] So we have three functions called first, second and third in order to make this easier to understand.


[User] Please transcribe this text

[Assistant] We start by calling the first function, which then calls the second function, which in turn calls the third function.


[User] Please transcribe this text

[Assistant] So from what we learned before, the call stack for this example will look like this, right? One execution context for each function in the exact order in which they were called. They also included the variable environment of each execution context.


[User] Please transcribe this text

[Assistant] For now, all this has nothing to do with scopes or the scope chain, alright? All I'm doing is creating one execution context for each function call and filling it with the variables of that function.


[User] Please transcribe this text

[Assistant] And you can pause the video here for a moment to understand the content of each variable environment.


[User] Please transcribe this text

[Assistant] Okay, and now that you did that, and we have all these variable environments in place, we can actually start building the scope chain.


[User] Please transcribe this text

[Assistant] As always, we're gonna start with the global scope.


[User] Please transcribe this text

[Assistant] And the variables available in the global scope are exactly the ones stored in the variable environment of the global execution context. And given everything we've learned so far, that makes sense, right?


[User] Please transcribe this text

[Assistant] And note that in this example, I am actually including functions in each scope, unlike we did in the previous slide.


[User] Please transcribe this text

[Assistant] Now in the global scope, we also call the first function, which is the reason why we have an execution context for it in the call stack. And this function, of course, also gets its own scope, which contains all the variables that are declared inside of the function.


[User] Please transcribe this text

[Assistant] And once again, this is exactly the same as the variable environment of the function's execution context.


[User] Please transcribe this text

[Assistant] However, that's not all, because now we already know about the scope chain. So the first scope also gets access to all the variables from its parent scope, thanks to the scope chain.


[User] Please transcribe this text

[Assistant] Now, as we already know, the scope chain is all about the order in which functions are written in the code.


[User] Please transcribe this text

[Assistant] But what's really important to note here is that the scope chain has nothing to do with the order in which functions were called. Or, in other words, the scope chain has nothing to do with the order of the execution contexts and the call stats.


[User] Please transcribe this text

[Assistant] The scope chain does get the variable environments from the execution contexts as shown by the red arrows here, but that's it. The order of function calls is not relevant to the scope chain at all. Alright? Really keep that in mind.


[User] Please transcribe this text

[Assistant] Now, moving on to the second function now. Once again, its scope is equal to its variable environment.


[User] Please transcribe this text

[Assistant] Also, it's lexically written within the first function, and so of course, it will have access to all its parent scopes as well.


[User] Please transcribe this text

[Assistant] So we can say that the scope chain in a certain scope is equal to adding together all the variable environments of all the parent scopes. And so this is how scope and the scope chain are built in the JavaScript engine behind the scenes.


[User] Please transcribe this text

[Assistant] Okay, now in the second function we try to call the third function.


[User] Please transcribe this text

[Assistant] But why does that work? Well, it works because the third function is in the scope chain of the second function scope, as we can see here in our scope chain diagram. It's a function in the global scope, or a global function, and therefore it's accessible everywhere.


[User] Please transcribe this text

[Assistant] Of course, this will create a new scope along with the scope chain, as we already know.


[User] Please transcribe this text

[Assistant] D is no problem, because it's right there in the third function's scope. So that one is easy. Then variable c is not in the local scope, and so JavaScript needs to do a variable lookup. So it looks up in the scope chain, looking for variable c, but it's not


[User] Please transcribe this text

[Assistant] And of course it isn't, because c is defined in the second function, and there is just no way in which the third function can access variables defined in the second function.


[User] Please transcribe this text

[Assistant] And that is true even though it was the second function who called the third. And so here is even more proof that the order in which functions are called does not affect the scope chain at all.


[User] Please transcribe this text

[Assistant] And with this, I hope I made it crystal clear that execution contexts, variable environments, the call stack, scope, and the scope chain are all different, but still very related concepts. And if it's not yet crystal clear, then it's no problem to maybe rewatch this slide.


[User] Please transcribe this text

[Assistant] Or maybe even this entire lecture a little bit later.


[User] Please transcribe this text

[Assistant] And I know that this was quite a long lecture with a ton of stuff to take in. And so here is a handy summary with the main takeaways from this video.


[User] Please transcribe this text

[Assistant] Now, there are three types of scope in JavaScript. The global scope, scopes defined by functions, and scopes defined by blocks, starting in ES6.


[User] Please transcribe this text

[Assistant] However, only let and const variables are block scoped. Variables declared with var automatically end up in the closest function scope.


[User] Please transcribe this text

[Assistant] Next, in JavaScript, we have lexical scoping, which means that the rules of where we can access variables are based on where in the code functions and blocks are written.


[User] Please transcribe this text

[Assistant] And now let the magic begin. Because every scope always has access to all the variables from all its outer scopes. And this is what we call the scope chain.


[User] Please transcribe this text

[Assistant] When a certain variable is not in the current scope, the engine looks up in the scope chain until it finds the variable that it's looking for. And this process is called variable lookup.


[User] Please transcribe this text

[Assistant] It's important to note that the scope chain is a one-way street, so a scope will never ever have access to the variables of an inner scope, only of outer scopes.


[User] Please transcribe this text

[Assistant] We can also think of the scope chain in a certain scope as being equal to adding together all the variable environments of all the parent scopes.


[User] Please transcribe this text

[Assistant] And finally, we need to keep in mind that the scope chain has nothing to do with the order in which functions were called. So the order of function calls does not affect the scope chain at all.


[User] Please transcribe this text

[Assistant] And you've gotta get up close to these things to really appreciate the scale. Look at the size of that tree.


[User] Please transcribe this text

[Assistant] You could create a shelter boat that would provide this almost a microclimate all year round and it would protect your garden, it would protect the slightly more tender plants, but it didn't just perform that function. It performed a really curious, beautiful aesthetic function in the garden as well that gave you interest around every corner.


[User] Please transcribe this text

[Assistant] It wasn't a cheap thing to plant a pineetum up. You know, in modern terms, on a young tree, you could be spending three or four hundred pounds.


[User] Please transcribe this text

[Assistant] And you know, when we look at the array of trees that are behind us here at Nymans, that three or four hundred pounds adds up pretty quickly. And he could have spent his money on anything. He could have bought buildings, he could have built huge mansions all over the country. He chose to spend the money on his passion. These trees were his passion.


[User] Please transcribe this text

[Assistant] When, when they were first discovered, they estimated that the trees were touching, if not exceeding, 400 feet tall. And that is, that is remarkable. Some of the tallest trees in the world. A really, really important tree on our planet.


[User] Please transcribe this text

[Assistant] From, from where I am, this tree is the first thing that the wind hits.