All right, so welcome back again. So in the previous tutorial, we saw how to work with optional argument. So now let's see how to add default to our option argument. So we would this simple COI ballistic of the status, the required option of right is going to be taken off. And now let's run it again, come back to my load than any of our CLA that does help with it, right, so we don't have anything. So this is the normal, there is no default in any three common that most have had when you're using optional, you meant you provide a default value.
So if I run the same thing that we have, with our first name, over, let's see. JOHN Wright, and I agreed that this was going to give us Hello, your name is john, your last name is undefined, right? But is not the best. So we have to make sure that we supply a default name. So how do you do that? So we can just come back to the same place as we did.
Then the next segment should be passing he is going to be the default, right? So you can just go With this option of a particular name, let's give it as a first name. So I'll just call this party. Right, that's going to be the default, right? And then the last name and just give it any last name. So let's go to say, right, very interesting.
So we have our first name. And now, but you all can be anything. But let's make it my two. Let's try it and see if I save it. And I come back here. So this give us undefined.
So in case I run the same thing that we did. Now, the last name is going to be your last name is Sandy rice, which is using the default name that you pass here. Right. So that is how to add a default name to your ocean argument. Very, very interesting. So the first argument is going to be the optional argument, then this is going to be the description, then this is going to be the default name turns out to add default names to it, too.
Thank you for watching, as seen in this session, stay blessed.