Hello and welcome to this video.
In this video we introduce you to the javascript string operators string operators are used to add strings
together using the addition operator when the addition operator is used with strings.
It is referred to as concatenation operator.
So when you're using string operators you can use the addition operator or you can also use the addition
and assignment operator which is the plus equals two which is the assignment so you can use both types
of operators to achieve a string operator function.
So let me quickly illustrate with a couple of basic examples.
So I have got my console here and I am going to create some variables or to create a variable just type
in the R and give the variable any name.
I'm going to give this variable a name one and I'm going to give it a value of.
Show me
that is a value.
And I'm going to create another variable and I'm going to call this variable number to go and assign
this value of the money.
So that's my value for variable number two.
I'm going to create another variable variable number three and I'm going to make this variable value
of variable one plus I'm now using the string operators or contact the value to my adding variable one
and I'm using blank quotes here the blank quotes here basically will create a space between the two
variables.
And I use another concatenation to add the variable number two.
So now variable number three will equal to the value of variable number 1 and 2.
So now if I call variable number three it would give me the value.
Show me the money.
So that's one way of using that string operator using the addition Operator will you use it this way
is called concatenation.
So let me show you a second way where you can use the assignment operator.
So I'm going to create a very poor code C and I'm gonna give it a value call.
Hello.
OK.
That would be the value of that variable.
Now I'm going to use the assignment operator to add to the value of that variable and the way I will
do this.
I'll just call the variable by name which is C and I use the assignment operator.
So I'm using the addition equals two together and I'm going to add a value add to a space to create
some space between the text say world.
And you can see now it has now added the word world two helos who are now concatenate it or use added
two strings together.
So I've used the assignment operator to achieve that and I've also used the addition operator in this
case to achieve that.
So that's basically how you use string operators.
Thank you for watching.
Bye for now.