Let's learn about the fun science in this lecture so it's always good fun to not used to perform some
operation.
So let me just take example straight away.
So if I just say something like add funds and.
Okay so what if you need to add some of the variable and I'll just give.
Okay Alice.
Make use of these sublime text here.
So if I just say if I just make you do this add operation every time and I'll just pass something like
let me say first of all you have to add it in nine in the second you have to add nine and zero in the
third operation you have to parse it in zero so you can see where it is doing same operation that is
adding and with the different argument over here.
So if I say Ah now let me say four fifty six.
So you are just adding You are just calling the same method or basically you are just adding You are
doing something like eight plus nine.
If I say add eight and nine in the second case in this do nine in all in the another case in this do
it in 56.
So what you are doing over here is just taking the argument over here and doing the addition both on
these arguments.
So what if I just say something like instead of this to value what if I just say in B.
So if I just say N B instead of it in nine and same N B instead of nine and 0 and it cannot be any value
and b can be any value you are just doing here that is a addition a B so you are just doing the same
operation which is ahead.
So in that case you can call is always good fun son many times do to use the code.
So simply you can make use of these add method other add funds and in order to add or in order to reduce
the court so you can simply make use of this plus operator for any value given to these once and so
list takes.
Example here.
So first of all you have to create the functions using the funds and cured.
So if I just save funds and so this is your way to create the funds.
So next one would be your funds and name.
So it would be your name and after that you have to give the bad and this is the opening penalties and
the closing penalties.
After that you will this define this code.
So its scope is basically the board which will be executed.
We knew this that on these funds and so here will be called.
So first one is your declaration of the funds then which we just did here which was using the funds
and you're giving the name which should be unique if is a script and not the funds then let me save
funds and and if name is already created.
So next one and should be something like Name one so which is basically to do with a distinct or unique
from another.
And this is your name one funds in.
So now let's create some useful funds then.
So what if I say I do your fund then and here are the spots and B.
So here inside this band is we have paused some argument over here which was in B which was the same
case what we talk about here.
So instead of passing it in nine which we can do simply is plus in B.
And after that you just defined this scope and here you say that these guns sold out log and operation
would be addition so you have simply made the funds then so you have declare the funds then but you
can see here we haven't got any output from that funds and because we are not calling that funds and
so just remember first part of the funds then is to just declare the funds and which is just a deed
here.
And the next one is to call that funds.
So anyway we need we call this once and to do the tax for us.
So simply calling is using the name which is the name of the funds and over here and pop star domain.
So in this case I'll just say it and nine.
So and as I say 89 you do this give me 17 which is basically lady of this in.
So second was 9 and 0.
So you can simply do the same operation with the next value which is nine.
And again you can do multiple operations.
This remember that the ad should be same is here which is the name of the variable annual despise any
value over here.
And it will I guess get the output is straight away after you call that function.
So it's always good funds and can have zero or more argument so you can simply say yeah we just passed
the two argument over here.
We can also simply make the function without argument.
I'll just say in full.
And it doesn't contain any argument.
It does this give me consoled love or it will this bring to me or give the alert of hello when you just
call this method.
So let's go here and now.
Next one is to call the method.
And in here we just don't pass anything because while defining the funds and we just didn't give any
pause it's a lot of women over here.
That means in the same four and you could see the symbol a of dialogue over here saying hello which
are the masses inside this Hello.
So this is the way in order to create the funds and without any arguments so you can simply pass no
argument over here or any number of argument as you did here which as with this two argument you can
also parse any number of argument over here and do your work over here.
So next thing let's learn quickly about the return statement.
So let me just clear the funds in real quick and do the same get in for simple function without any
pauses no argument which is basically the argument inside disparities is so this say return cured.
So in before example what we did was we just made the use of this method but this method was just printing
something inside this school.
It was not returning or it was not getting anything you have to the Supreme and the addition are giving
the masses inside this.
But now what you'll do is simply with this create the funds and and this fun scene with this a getting
for.
And this time it will.
This is written me something so I'll just say hello.
Feuds.
Hackers.
So this should be the masses.
And now let's close this once and after that as this call these funds and any.
So if it's a see over here we don't pass any argument over here because it is empty while declaring
the funds and if I just spin this then you could see the masses straight away that is saying hello future
hacker which was the return from these funds and so if with this same sort of return.
So let me just make something like again the function and this time it would be ad and if I just say
OK.
And B and this method is going to say something that is a return me addition of and b you can also multiply
so as the addition of N B.
So this is matter.
So now if I just call addition 7 and 8 you would see nothing would be printed but this is the terminal
like ending of the browser so you can simply see it has returned seven and it.
But if you just make use of the sublime then it won't bring you anything because you have to this make
use of spend sold out log statement in order to call this ad and additions would be done like this and
you could see 15 with the help of Sublime Text also.
So return is basically giving you the value and while calling this the output basically if you just
see something like C additions four and five and now the C value would be the nine because when you
return from any funds then that would be the value return while calling that fund.
And so this value which is basically at four in five will be nine will be stored in sea and C has been
printed is nine.
So this is very useful in order to make use of the written statement in the funds.
And we have learned about how to create the fund since How do you define the funds and how to call the
funds in passing the argument to the funds in and using the return cured which is the basically of the
funds and which would be useful while creating the key loggers in the upcoming lecture.
Soon the next one.