1
00:00:00,660 --> 00:00:01,820
Hello and welcome.

2
00:00:02,010 --> 00:00:02,960
In this city.

3
00:00:02,970 --> 00:00:15,360
I'm going to introduce you to what executing a program means programming to execute or executing a program

4
00:00:15,960 --> 00:00:21,340
basically means getting the program to take some kind of action.

5
00:00:21,540 --> 00:00:28,860
So often you hear developers are programmers using the word execute or executing what they basically

6
00:00:28,860 --> 00:00:33,580
mean is that they get in a computer program to do some.

7
00:00:33,720 --> 00:00:37,280
Another word you may hear is wrong.

8
00:00:37,350 --> 00:00:44,880
So executing and running a program is basically the same thing to execute the program.

9
00:00:44,920 --> 00:00:52,580
You tell in the computer to run or get the program to take some kind of action.

10
00:00:52,710 --> 00:01:01,630
The programs can be executed in various types of environments and also in different ways.

11
00:01:01,650 --> 00:01:10,440
For example if you have a bunch of code in the developer console you can execute a statement or several

12
00:01:10,440 --> 00:01:13,230
statements inside the developer console.

13
00:01:13,230 --> 00:01:20,260
So depending on the environment you want to execute your code there are different ways you can do it

14
00:01:20,260 --> 00:01:33,000
that I have called three complete group statements displayed inside the developer console to get for

15
00:01:33,000 --> 00:01:42,190
example if I wanted to get value for the third statement which is a variable and numbers.

16
00:01:42,520 --> 00:01:48,810
I wanted to get the computer to compute the value and display it.

17
00:01:48,810 --> 00:01:58,260
There are couple of ways I can go ahead to execute or run the statement in order to get the desired

18
00:01:58,350 --> 00:02:00,860
output I want output.

19
00:02:00,870 --> 00:02:05,850
Basically is what the computer gives back to you.

20
00:02:06,270 --> 00:02:18,240
All right so for this statement if I want to get an output I want the computer program to compute the

21
00:02:18,240 --> 00:02:19,960
value here.

22
00:02:20,010 --> 00:02:26,510
First number plus second number and I wanted to display it in the pop shop window.

23
00:02:26,820 --> 00:02:34,080
Now a pop up box is something you may have come across before it's usually used to display different

24
00:02:34,080 --> 00:02:40,600
types of messages and to do that we use an alert function.

25
00:02:40,740 --> 00:02:44,070
An alert is a built in function into have a script.

26
00:02:44,120 --> 00:02:52,620
If function is basically a bunch of code that does something specific the purpose of an alert function

27
00:02:52,710 --> 00:02:57,640
is to display messages in a pop up box.

28
00:02:57,810 --> 00:03:07,860
So in order to execute the statement on line 3 which is this number I'm going to use the alert function

29
00:03:07,900 --> 00:03:16,770
which is a pop up box so I type in alert he has for being a lower case and then in parentheses I need

30
00:03:16,770 --> 00:03:21,690
to add what I want to pop up.

31
00:03:22,110 --> 00:03:28,160
Okay so I want this variable called add numbers.

32
00:03:28,340 --> 00:03:31,800
That's the code I'm trying to execute.

33
00:03:32,630 --> 00:03:35,240
All right and put a semicolon.

34
00:03:35,340 --> 00:03:35,920
So what.

35
00:03:35,920 --> 00:03:45,000
That to a thought had the first number which is 27 plus the second number which is 47.

36
00:03:45,180 --> 00:03:53,970
So if it were add these two variables together and display the results in a pop up box alert is a built

37
00:03:53,970 --> 00:04:01,320
in function in javascript that pops up messages so the message I want it to pop up is this one here

38
00:04:01,320 --> 00:04:07,230
is the variable and this variable is equal is to this variable plus stack variables.

39
00:04:07,230 --> 00:04:15,840
If I press Enter I should get a pop up box we can see here his displayed the output here which is 7

40
00:04:15,850 --> 00:04:20,260
to force with say in fact add this plus this.

41
00:04:20,260 --> 00:04:22,210
It will give me that.

42
00:04:22,350 --> 00:04:34,560
So this is known as an alert pop up box so the output now executed this statement in an alert box.

43
00:04:34,610 --> 00:04:37,640
I just click okay and the message will go away.

44
00:04:37,680 --> 00:04:44,220
Now I can also execute the same statement in a different way.

45
00:04:44,220 --> 00:04:49,630
I want I want the result to display inside his console whole years.

46
00:04:49,830 --> 00:04:53,730
Another function which is call the console log.

47
00:04:54,060 --> 00:04:57,130
So I just typed in basically what the consular log means.

48
00:04:57,150 --> 00:04:59,830
It will display the output.

49
00:05:00,130 --> 00:05:01,430
Inside the console.

50
00:05:01,480 --> 00:05:03,200
So let me do the same thing.

51
00:05:03,750 --> 00:05:16,600
Consul in parentheses add what I want a console to display which is the variable code numbers so big

52
00:05:16,630 --> 00:05:19,750
console dot.

53
00:05:20,170 --> 00:05:21,220
Log.

54
00:05:21,610 --> 00:05:23,240
Okay.

55
00:05:23,920 --> 00:05:36,040
So you typee Console log and inside parentheses you have to had the semicolon and they press enter.

56
00:05:36,160 --> 00:05:43,900
You can see here the console log which is a function past in giving it the information I want to be

57
00:05:43,900 --> 00:05:51,120
displayed and the information I want is this variable here called add numbers so you can see his display

58
00:05:51,150 --> 00:05:59,290
added to the output inside the console how poor physically is the result that the progun gives back.

59
00:05:59,290 --> 00:06:01,480
So it's been displayed in the console.

60
00:06:01,630 --> 00:06:11,110
So these are some basic examples of executing programs so when you hear it executing or to execute is

61
00:06:11,110 --> 00:06:18,310
the same thing as running a program or to run a program it means you get in the computer tell the program

62
00:06:18,760 --> 00:06:26,170
to take some plan of action to display some output so that's it for this video.

63
00:06:26,170 --> 00:06:27,250
Thanks for watching.

64
00:06:27,250 --> 00:06:28,240
Bye for now.
