3 Javascript- Function Invocation| arguments Keyword| Variable Environment



Javascript- Function Invocation| arguments Keyword| Variable Environment

programs are simply assigning memory, for example, assigning a value to a variable and then running a function for the program to do something with those variables that’s what all programs are, and without functions, our programs wouldn’t do anything this is an important concept in all programming languages and as you’ll see in future videos functions give us some amazing powers in JavaScript so let’s define functions and some of the common terms around them we already touched on the fact that we have function expressions and function declarations a function declaration is something that starts with the function keyword and let’s just create a function India and this function will simply console .log or because it’s pretty warm in India a function expression, on the other hand, doesn’t start with the function keyword instead can look like this let’s say variable Canada and that’s going to equal function

and inside of this function it’s console.log and Canada is very cold at least where I’m filming right now it’s extremely cold and that’s a function expression and we’ve learned about this and how function declarations get hoisted function Expressions don’t I could also write this with an arrow function and do something like this if I wanted to I’ll have the same effect now with our functions we can call them right and the terms here sometimes vary but you can have function let’s comment this out we can have function invoke invocation calling a function or you can never even have execution of a function and what that means is we’re telling our JavaScript engine to hey run our function we’ve put these functions in memory or at least we’ve assigned a variable and now we’re ready to do something with our program so we do a function invocation by simply running the function with curly brackets and as soon as the JavaScript engine sees this it says all right what do we do we create an execution context same with India

00:07 Function Invocation
07:04 arguments Keyword
11:18 Variable Environment

THANKS FOR WATCHING AND DON’T FORGET TO LIKE, COMMENT, SUBSCRIBE, AND HIT THE BELL ICON TO WATCH THE LATEST VIDEO!
#edudreams #js #javascript