Hello, in this video, we are going to take a look at dynamic function calls. So what a dynamic function call is, well, if we have this function Hello, which I've just created to call it, we would, you know, say hello, like so pretty simple. And you initiate the code in this case, which occurs on for now, just so we can see what it's doing. It could be any sort of code return value, you can take parameters in doesn't matter. And, okay, so that's a regular function call, what we can do is basically assign a function to a variable name. So that's a sort of a cool way of almost a renaming a lack of function temporarily.
But another great use case for it is, if, for example, the user, let's say, if you're creating some sort of website, where the user can pick some sort of, you know, action, and when they click the play button or you know, some button, the action they've selected gets triggered because Assign the option to a variable that they've selected. And when they click, you know, you know, play or whatever the button to initiate that action, it just goes to that variable it doesn't you know, has had some sort of complex f4 switch case to determine which one they selected. So that's another use case. So to do it, all you would do is dollar than the function for, you know, function var name. And this will equal to you put quotation marks. And now what you do is put the name of the function with out the parentheses.
And now, if we do this dollar function, var name, let's see what we get. We get nothing at all. It's just a string, but we put parentheses at the end. He treats it like it's a function and because it's been a sign A string is basically the equivalent of having that there. So that's basically what it's essentially doing. So that is a dynamic function call nothing more to it than that Locke said you can have, you know, return types, because this could return a value.
You could provide parameters then and as an extra task only to experiment with those two things. So return type, I mean return values, and passing in arguments, and let me know how it goes. If you have any questions, feel free to pop me a message. And as usual, I look forward to seeing you in the next video.