Hello, in this JavaScript video, I'm going to show you anonymous functions. So a regular function is something like this. And console dot log does want to mention anything that you would usually do with a regular function like return statements, passing in parameters, you can do all of that with a anonymous function as well, I was going to be keeping a Hello World. And obviously I need to run this function to be able to get its code to run. There we go, hello world. anonymous function works slightly differently.
So what we have instead of like this, we don't use this we don't actually have a name for the function, we assign it to a variable. So what we can do is, ball this VA equals Let me just do that before. And you know, equals the same way. So instead of creating a function with the name, we have a nameless function date assigned to a variable. So this is a variable. So this could actually be overwritten.
You could do epi by equals nine, for example, then epic, and so on so forth. Let's do it and see what happens. We get an error because it has been overwritten. So that's one of the big benefits of using it. The other thing is enlightening to actually pass in a function to into another function. If you're going to do some, you know, data processing beforehand, and then you're going to call that function later on, and then maybe that variable is assigned to something else.
So it's really really powerful. I'm going to leave it leave it at this, I want you to experiment, pass in to a nova function, distrust the variable so you can do it in the normal way. If you have any questions, feel free Free to pop me a message and I look forward to seeing you in the next video.