1
00:00:00,540 --> 00:00:03,590
Hello and welcome to this video.

2
00:00:03,630 --> 00:00:15,360
In this video we introduce you to the javascript string operators string operators are used to add strings

3
00:00:15,750 --> 00:00:28,560
together using the addition operator when the addition operator is used with strings.

4
00:00:28,560 --> 00:00:35,180
It is referred to as concatenation operator.

5
00:00:35,730 --> 00:00:45,060
So when you're using string operators you can use the addition operator or you can also use the addition

6
00:00:45,330 --> 00:00:52,620
and assignment operator which is the plus equals two which is the assignment so you can use both types

7
00:00:52,620 --> 00:01:00,650
of operators to achieve a string operator function.

8
00:01:00,660 --> 00:01:05,610
So let me quickly illustrate with a couple of basic examples.

9
00:01:05,880 --> 00:01:15,380
So I have got my console here and I am going to create some variables or to create a variable just type

10
00:01:15,380 --> 00:01:18,340
in the R and give the variable any name.

11
00:01:18,360 --> 00:01:27,120
I'm going to give this variable a name one and I'm going to give it a value of.

12
00:01:27,360 --> 00:01:28,560
Show me

13
00:01:32,850 --> 00:01:33,690
that is a value.

14
00:01:35,640 --> 00:01:43,320
And I'm going to create another variable and I'm going to call this variable number to go and assign

15
00:01:43,320 --> 00:01:51,960
this value of the money.

16
00:01:51,960 --> 00:01:55,770
So that's my value for variable number two.

17
00:01:55,770 --> 00:02:07,200
I'm going to create another variable variable number three and I'm going to make this variable value

18
00:02:07,230 --> 00:02:16,890
of variable one plus I'm now using the string operators or contact the value to my adding variable one

19
00:02:17,790 --> 00:02:25,950
and I'm using blank quotes here the blank quotes here basically will create a space between the two

20
00:02:25,950 --> 00:02:27,070
variables.

21
00:02:27,480 --> 00:02:34,600
And I use another concatenation to add the variable number two.

22
00:02:35,250 --> 00:02:41,550
So now variable number three will equal to the value of variable number 1 and 2.

23
00:02:41,550 --> 00:02:47,940
So now if I call variable number three it would give me the value.

24
00:02:47,940 --> 00:02:50,200
Show me the money.

25
00:02:50,280 --> 00:02:57,780
So that's one way of using that string operator using the addition Operator will you use it this way

26
00:02:57,790 --> 00:03:00,660
is called concatenation.

27
00:03:00,660 --> 00:03:05,290
So let me show you a second way where you can use the assignment operator.

28
00:03:05,670 --> 00:03:13,370
So I'm going to create a very poor code C and I'm gonna give it a value call.

29
00:03:15,030 --> 00:03:15,750
Hello.

30
00:03:18,360 --> 00:03:21,040
OK.

31
00:03:21,420 --> 00:03:25,370
That would be the value of that variable.

32
00:03:25,410 --> 00:03:32,310
Now I'm going to use the assignment operator to add to the value of that variable and the way I will

33
00:03:32,310 --> 00:03:32,820
do this.

34
00:03:32,830 --> 00:03:39,120
I'll just call the variable by name which is C and I use the assignment operator.

35
00:03:39,450 --> 00:03:49,230
So I'm using the addition equals two together and I'm going to add a value add to a space to create

36
00:03:49,230 --> 00:03:53,980
some space between the text say world.

37
00:03:56,100 --> 00:04:07,730
And you can see now it has now added the word world two helos who are now concatenate it or use added

38
00:04:07,730 --> 00:04:09,320
two strings together.

39
00:04:09,330 --> 00:04:17,040
So I've used the assignment operator to achieve that and I've also used the addition operator in this

40
00:04:17,040 --> 00:04:18,710
case to achieve that.

41
00:04:18,720 --> 00:04:23,690
So that's basically how you use string operators.

42
00:04:24,330 --> 00:04:25,620
Thank you for watching.

43
00:04:25,800 --> 00:04:26,640
Bye for now.
