Hello and welcome.
In this city.
I'm going to introduce you to what executing a program means programming to execute or executing a program
basically means getting the program to take some kind of action.
So often you hear developers are programmers using the word execute or executing what they basically
mean is that they get in a computer program to do some.
Another word you may hear is wrong.
So executing and running a program is basically the same thing to execute the program.
You tell in the computer to run or get the program to take some kind of action.
The programs can be executed in various types of environments and also in different ways.
For example if you have a bunch of code in the developer console you can execute a statement or several
statements inside the developer console.
So depending on the environment you want to execute your code there are different ways you can do it
that I have called three complete group statements displayed inside the developer console to get for
example if I wanted to get value for the third statement which is a variable and numbers.
I wanted to get the computer to compute the value and display it.
There are couple of ways I can go ahead to execute or run the statement in order to get the desired
output I want output.
Basically is what the computer gives back to you.
All right so for this statement if I want to get an output I want the computer program to compute the
value here.
First number plus second number and I wanted to display it in the pop shop window.
Now a pop up box is something you may have come across before it's usually used to display different
types of messages and to do that we use an alert function.
An alert is a built in function into have a script.
If function is basically a bunch of code that does something specific the purpose of an alert function
is to display messages in a pop up box.
So in order to execute the statement on line 3 which is this number I'm going to use the alert function
which is a pop up box so I type in alert he has for being a lower case and then in parentheses I need
to add what I want to pop up.
Okay so I want this variable called add numbers.
That's the code I'm trying to execute.
All right and put a semicolon.
So what.
That to a thought had the first number which is 27 plus the second number which is 47.
So if it were add these two variables together and display the results in a pop up box alert is a built
in function in javascript that pops up messages so the message I want it to pop up is this one here
is the variable and this variable is equal is to this variable plus stack variables.
If I press Enter I should get a pop up box we can see here his displayed the output here which is 7
to force with say in fact add this plus this.
It will give me that.
So this is known as an alert pop up box so the output now executed this statement in an alert box.
I just click okay and the message will go away.
Now I can also execute the same statement in a different way.
I want I want the result to display inside his console whole years.
Another function which is call the console log.
So I just typed in basically what the consular log means.
It will display the output.
Inside the console.
So let me do the same thing.
Consul in parentheses add what I want a console to display which is the variable code numbers so big
console dot.
Log.
Okay.
So you typee Console log and inside parentheses you have to had the semicolon and they press enter.
You can see here the console log which is a function past in giving it the information I want to be
displayed and the information I want is this variable here called add numbers so you can see his display
added to the output inside the console how poor physically is the result that the progun gives back.
So it's been displayed in the console.
So these are some basic examples of executing programs so when you hear it executing or to execute is
the same thing as running a program or to run a program it means you get in the computer tell the program
to take some plan of action to display some output so that's it for this video.
Thanks for watching.
Bye for now.