 In this video, we're going to talk about anonymous functions in TypeScript language. Anonymous functions in TypeScript language are almost the same as anonymous functions in JavaScript except that you need to explicitly define your variable types. So let's make a simple anonymous function. Let's make first and variable, let's call it multiply. We're going to assign our function to a variable multiply and we're going to use that variable to execute our anonymous function later. Okay, let's make a function. Our function is going to have two parameters. First one is going to be variable xx which is going to be a number and second is going to be variable y which also is going to be a number and returning value of our function is also going to be a number. So in this case, we want to multiply two numbers x and y and return their value. So we want to return value of x times y and that's our anonymous function. Later we can call our anonymous function by using this name, we're going to use variable multiply and provide two arguments x and y, for example, two and five. Okay, now let's check how our code will look like in JavaScript. It's going to look almost the same except that we need to provide for our TypeScript code that variable x has number type and variable y has number type which you do not need to provide in JavaScript and also we're going to provide our returning value of our anonymous function which is going to be number and again in JavaScript you do not need to provide that variable. So these two functions in TypeScript and in JavaScript are almost the same except that you need to provide types for your variables. Okay, then let's back again to our TypeScript function and let's play with it a little bit. First, what if we want to make this function to has a name? For example, to has a name multiplication. Can we then use this multiplication name to call our function in our code later? For example, here can I call multiplication function on the same way as I called multiply function here and provide the same arguments. Can we do that? Of course, we can't, we will get an error because our compiler said that it can find name multiplication. So if you want to define the name of your anonymous function it will not be visible outside of your function and if you want to work with your function you need to use the name of your variable and provide arguments to your variable and not to the name of your anonymous function and let's say, okay, we can delete that name to make our code more cleaner and how can we run our function, anonymous function immediately after we've created it? How to run it after creation? We can do that by, I will delete this code, by putting this function inside parentheses and close it right here and put semicolon and inside of our block here, inside of these parentheses we will provide two arguments for our function, which is going to, first argument is going to be for number x and second argument is going to be for number five. That is almost the same as we called our function like this. So you can use your anonymous function to immediately call it and provide to it arguments as you will do by calling the name of your variable and provide the same arguments. So you have few options to choose how to use your code and how to use your anonymous function and again these anonymous functions are very similar to the JavaScript anonymous function except that you need to explicitly define your variable types in TypeScript, which you don't need to define in JavaScript. That's all for now in this video and for example, if you want to print, I don't know result for of this function, you can print the result to the screen with document.frite and this multiply will return to us number, so we need to convert it to string, so we're going to say document.frite, multiply these two numbers and convert the result, which is a number to a string. Okay, I think that we need to delete this. Okay, and that's it for now in this video. Thanks for watching. See you in the next video and please don't forget to subscribe to my channel.