Hey there, welcome back! In this quick video I just want to go over the terminology that we've been using
again.
I'm just going to repeat it, so that you really have it nailed.
The first one that we've learned about is the idea of 'function declaration' and 'function declaration' is a
way for us to create functions
like this.
We also learned about 'function expression' and 'function expression' is a way for us to create functions
with a variable like
this.
And 'function expressions' can also have names.
Or it could be an anonymous function like this.
You're more likely to encounter this than with names.
But I want to show you both of those.
OK.
What else do we have?
We also have this idea of 'expression' and an 'expression' is...
Well, this actually gives it a good-good overview and 'expression' is something that denotes a value.
So, '1+3;' is an 'expression' and we end 'expressions' with semicolon.
If we do 'var a = 2;' that's an 'expression'.
If we're returning something from a function, we're returning 'true',
that's an expression. So an 'expression' is something that produces a value.
OK. How do we make a function perform that action?
Well, we call that 'calling' or 'invoking' a function.
And we do that by doing 'alert'.
And then the brackets or we can do something like 'newFunction', 'param1', 'param2' and we call
or invoke a function this way. We also assign a variable and we do that by, well, we assign 'var a = true;'
OK. We also learn about 'function vs. methods'.
Or method and a function is something like
'thisIsAFunction'
A 'method' is something that is inside of an object, like 'thisIsAMethod'.
So the way we access them is different.
A 'function' is accessed like this, a 'method' is accessed with a 'dot' in front of it.
And there you have it: a few terminologies that I've been using that
hopefully, you've learned them by now, but wanted to recap everything, so that it really really sticks.
And this should make everything more clear.
I'll see you in the next one.
Bye-Bye