1
00:00:00,300 --> 00:00:06,030
So I need to actually write another line of code in order to put the value of this variable.

2
00:00:06,270 --> 00:00:07,590
After the decremented.

3
00:00:07,600 --> 00:00:07,950
OK.

4
00:00:07,950 --> 00:00:13,240
So in this line of code we decremented the value of this variable by one.

5
00:00:13,350 --> 00:00:13,820
OK.

6
00:00:13,980 --> 00:00:22,540
So I need to type in here system that out that print land and then inside Apprentice's it refers to

7
00:00:22,560 --> 00:00:24,650
the name of my variable.

8
00:00:25,500 --> 00:00:28,830
And then at the end of my statement I need to put in a semicolon.

9
00:00:28,840 --> 00:00:29,370
OK.

10
00:00:29,640 --> 00:00:35,290
So now if I run my project as you can see it's going to output this value to the consulate.

11
00:00:35,430 --> 00:00:38,900
The value of my value is now subtracted by 1.

12
00:00:39,030 --> 00:00:40,040
OK.

13
00:00:40,620 --> 00:00:46,920
So that sets up for actually incrementing and decrementing operator.

14
00:00:46,980 --> 00:00:55,160
So these increment and decrement operators can be placed before or after a variable name.

15
00:00:55,290 --> 00:00:56,230
OK.

16
00:00:56,580 --> 00:00:58,500
So now let me show you some examples.

17
00:00:58,590 --> 00:01:02,770
When we actually place these operators before the variable name.

18
00:01:02,790 --> 00:01:03,310
OK.

19
00:01:03,480 --> 00:01:10,560
So for example I want to create another variable here ain't number one and then I assign a value to

20
00:01:10,560 --> 00:01:11,410
my variable here.

21
00:01:11,430 --> 00:01:12,010
OK.

22
00:01:12,240 --> 00:01:15,440
And then at the end of my statement I need to put in a semicolon.

23
00:01:15,600 --> 00:01:22,660
So now I want to output the value of this to the console system out of that princeling and then inside

24
00:01:22,650 --> 00:01:23,520
the practices.

25
00:01:23,730 --> 00:01:29,190
I just need to refer to the name of my variable and at the end of my statement I need to put in a semi-colon.

26
00:01:29,190 --> 00:01:29,710
OK.

27
00:01:30,000 --> 00:01:35,070
So now if I run my project as you can see it's going to output this value to the console.

28
00:01:35,070 --> 00:01:35,750
OK.

29
00:01:36,240 --> 00:01:42,340
So now I want to use this increment or decrement operator before the variable name.

30
00:01:42,450 --> 00:01:44,990
So now I put the increment operator.

31
00:01:45,240 --> 00:01:50,240
And after that I referred to the name of my valuable number one.

32
00:01:50,720 --> 00:01:51,500
OK.

33
00:01:51,510 --> 00:01:55,010
And then at the end of my statement I need to put in a semi-colon.

34
00:01:55,320 --> 00:01:58,730
So now I want to output the value of this valuable to the console.

35
00:01:58,780 --> 00:02:06,230
Sister out of print land and then inside the parenthesis I need to refer to the name of my variable

36
00:02:06,990 --> 00:02:11,660
non-fun and at the end of my statement I need to put a semicolon.

37
00:02:11,660 --> 00:02:12,200
OK.

38
00:02:12,410 --> 00:02:15,920
So now if I write on my project let's see what happens.

39
00:02:15,950 --> 00:02:20,980
So as you can see again it increments the value of this variable by 1.

40
00:02:21,050 --> 00:02:22,060
OK.

41
00:02:22,550 --> 00:02:27,070
So this is the code for actually incrementing the value of this variable by 1.

42
00:02:27,130 --> 00:02:27,720
OK.

43
00:02:27,890 --> 00:02:30,760
We put the increments.

44
00:02:30,770 --> 00:02:35,260
Operator we put the increment operator before the variable name.

45
00:02:35,330 --> 00:02:36,170
OK.

46
00:02:36,740 --> 00:02:41,260
And if you want to actually decrement the value of this variable by one.

47
00:02:41,300 --> 00:02:44,010
So let me comment out these lines of code here.

48
00:02:44,240 --> 00:02:48,010
And now I want to decrement the value of this variable by 1.

49
00:02:48,050 --> 00:02:48,670
OK.

50
00:02:48,920 --> 00:02:52,980
So I put the decrement operator before the value.

51
00:02:53,110 --> 00:02:54,190
OK.

52
00:02:55,070 --> 00:02:59,170
So as you can see I need to put a semi-colon at the end of my statement.

53
00:02:59,270 --> 00:03:05,900
So now I want to output the value of this valuable to the concert system that's out that printer land.

54
00:03:06,560 --> 00:03:12,290
And then inside the prentices I need to refer to the name of my variable and at the end of my statement

55
00:03:12,350 --> 00:03:14,030
I need to put in a semicolon.

56
00:03:14,240 --> 00:03:21,290
So now if I run my project as you can see it decrements this value by 1.

57
00:03:21,350 --> 00:03:21,950
OK.

58
00:03:22,040 --> 00:03:26,350
Decremented the value of this variable which is number 30 by 1.

59
00:03:26,510 --> 00:03:27,130
OK.

60
00:03:27,350 --> 00:03:29,110
So this is our value.

61
00:03:29,180 --> 00:03:36,620
So what's the difference between actually putting these operators after or before the variable name.

62
00:03:36,830 --> 00:03:42,430
In simple expressions such as these expressions as you can see it doesn't make any difference OK.

63
00:03:42,650 --> 00:03:47,910
But in larger expressions it's going to be it's going to actually make a huge difference.

64
00:03:47,930 --> 00:03:48,440
OK.

65
00:03:48,680 --> 00:03:54,510
So now let me show you some real examples in order to make this concept more clear for you.

66
00:03:54,560 --> 00:03:55,090
OK.

67
00:03:55,280 --> 00:04:01,860
So increment and decrement operators are called prefix operators.

68
00:04:01,880 --> 00:04:08,250
If listed before the variable name and postfix operators if listed after a value of a name.

69
00:04:08,270 --> 00:04:09,000
OK.

70
00:04:09,410 --> 00:04:17,870
So as you can see here in this example as you can see this increment operator is called prefix operator

71
00:04:18,350 --> 00:04:22,980
and this decrement operator here is called prefix operator.

72
00:04:23,240 --> 00:04:33,710
And in this example for example this increment operator is called postfix operator and these decrement

73
00:04:33,710 --> 00:04:36,200
operator is called postfix.

74
00:04:36,200 --> 00:04:37,480
OPERATOR OK.

75
00:04:37,580 --> 00:04:40,620
So now let me actually show you some real examples.

76
00:04:40,640 --> 00:04:41,260
OK.

77
00:04:41,420 --> 00:04:44,420
So first I'm going to actually create some variables here.

78
00:04:44,480 --> 00:04:48,130
So are the Data Type of my first Raddy is it.

79
00:04:48,380 --> 00:04:53,230
And the name of my first variable is for example first value.

80
00:04:53,240 --> 00:04:54,110
OK.

81
00:04:54,660 --> 00:04:55,320
Okay.

82
00:04:55,610 --> 00:04:58,400
And then I assign no value to my valuable here.

83
00:04:58,400 --> 00:04:59,060
OK.

84
00:04:59,390 --> 00:05:09,930
And then again the Data Type of my variable is in the name of my variable is second variable OK.

85
00:05:10,470 --> 00:05:17,400
And again I want to create another variable data type of data type of my valuable is it.

86
00:05:17,580 --> 00:05:21,390
And the name of my is for value it.

87
00:05:21,870 --> 00:05:22,770
OK.

88
00:05:23,370 --> 00:05:25,930
And then I assign no value to my variable here.

89
00:05:26,010 --> 00:05:30,940
OK so now I want to actually give my first value a bad value.

90
00:05:31,140 --> 00:05:37,440
So I just need to refer to the name of my first variable and then I assign a value to my variable for

91
00:05:37,440 --> 00:05:38,830
example number 30.

92
00:05:38,940 --> 00:05:39,680
OK.

93
00:05:39,990 --> 00:05:43,330
And then at the end of my statement I need to put in a semicolon.

94
00:05:43,530 --> 00:05:48,560
So now I want to output the value of this variable to the cancer OK.

95
00:05:48,650 --> 00:05:54,410
And then inside the prentices I need to refer to the name of my variable and then at the end of my statement

96
00:05:54,440 --> 00:05:55,810
I need to put in a semicolon.

97
00:05:55,820 --> 00:05:56,280
OK.

98
00:05:56,570 --> 00:06:02,450
So now if I write on my project as you can see it's going output the value of this first variable to

99
00:06:02,450 --> 00:06:03,360
the console OK.

100
00:06:03,410 --> 00:06:07,900
So now I'm going to actually assign a value to my second variable.

101
00:06:07,910 --> 00:06:08,750
OK.

102
00:06:09,050 --> 00:06:16,610
So I just need to refer to the name of my second variable and then I want to assign the value of this

103
00:06:16,610 --> 00:06:19,430
first variable to my second variable.

104
00:06:19,640 --> 00:06:24,980
So now I want to actually assign a value to my second variable here.

105
00:06:24,980 --> 00:06:25,440
OK.

106
00:06:25,520 --> 00:06:33,110
So I want to assign the value of this first valuable ok to my second variable.

107
00:06:33,230 --> 00:06:40,010
So in order to assign the value of my first Avari Abella to my second variable i just need to refer

108
00:06:40,010 --> 00:06:42,260
to the name of my first variable.

109
00:06:42,520 --> 00:06:43,140
OK.

110
00:06:43,190 --> 00:06:46,040
In order to read it's value OK.

111
00:06:46,580 --> 00:06:50,380
And at the end of my statement I just need to put a semicolon OK.

112
00:06:50,720 --> 00:06:57,650
So now if I want to actually output the value of the second variable to the console I just need to actually

113
00:06:57,650 --> 00:07:03,260
type in a system that's out that insulin.

114
00:07:04,640 --> 00:07:10,290
And then inside Apprentice's I just need to refer to the name of my second variable.

115
00:07:10,590 --> 00:07:14,740
And at the end of my statement I need to put in a semicolon OK.

116
00:07:15,020 --> 00:07:23,330
So now if I actually run my project as I can see again it's going to output this this number 40 to the

117
00:07:23,330 --> 00:07:23,900
console.

118
00:07:23,990 --> 00:07:24,570
OK.

119
00:07:24,740 --> 00:07:27,730
So this value is the value of the first value of it.

120
00:07:27,830 --> 00:07:28,310
OK.

121
00:07:28,430 --> 00:07:34,030
And we assigned the value of the first variable to my second variable.

122
00:07:34,220 --> 00:07:34,830
Okay.

123
00:07:35,150 --> 00:07:41,820
And in line 47 We decided to output the value of the second variable to the OK.

124
00:07:41,840 --> 00:07:43,490
As you can see here.

125
00:07:43,490 --> 00:07:48,300
So now I want to actually assign a value to my first variable OK.

126
00:07:48,320 --> 00:07:52,310
So again I just need to refer to the name of my first variable.

127
00:07:52,790 --> 00:07:59,070
As you can see here and then again are you want to assign the value of the first variable.

128
00:07:59,150 --> 00:08:02,990
As you can see here the value of the first variable is 40.

129
00:08:02,990 --> 00:08:03,520
OK.

130
00:08:03,740 --> 00:08:05,180
To my first value.

131
00:08:05,270 --> 00:08:06,230
OK.

132
00:08:06,230 --> 00:08:11,730
So I just need to refer to the name of my first variable in order to read its value.

133
00:08:11,860 --> 00:08:12,660
Okay.

134
00:08:12,710 --> 00:08:16,920
And then at the end of my statement I need to put a semi-colon OK.

135
00:08:17,480 --> 00:08:22,970
So now I want to actually output the value of this first variable to the console.

136
00:08:23,150 --> 00:08:30,470
So just type in here a system that out that Prensa learn and then inside Apprentice's.

137
00:08:30,650 --> 00:08:36,950
I just need to refer to the name of my first variable and then at the end of my statement I just need

138
00:08:36,950 --> 00:08:38,980
to put a semi-colon OK.

139
00:08:39,070 --> 00:08:45,140
So now if I run my project as you can see again it's going to output this value.

140
00:08:45,260 --> 00:08:46,960
This number for the concert.

141
00:08:46,970 --> 00:08:55,420
Ok this value is the value of the first variable as we assign a value to this variable in line 44.

142
00:08:55,460 --> 00:08:56,080
OK.

143
00:08:56,480 --> 00:09:05,960
We assigned a value to this first variable in line 44 and in line 45 we decided to output the value

144
00:09:05,960 --> 00:09:08,020
of this first variable to the console.

145
00:09:08,300 --> 00:09:13,670
So as you can see here this value is the result of execution of this line of code here.

146
00:09:13,780 --> 00:09:22,460
We decided to output the value of this first variable to the console and in line 46 I actually assigned

147
00:09:22,900 --> 00:09:30,590
a value to my second value and I assigned the value of the first variable to my second variable and

148
00:09:30,680 --> 00:09:37,650
in line 47 I decided to output the value of the second variable to the console.

149
00:09:37,670 --> 00:09:44,660
So as you can see here a decent value here this number 40 is the result of execution of this line of

150
00:09:44,660 --> 00:09:45,210
code here.

151
00:09:45,230 --> 00:09:46,260
Okay.

152
00:09:46,740 --> 00:09:54,550
And line 48 I decided to actually assign a value to my first variable.

