All right.
Welcome back.
So in this video we're going to talk briefly about assignment operators.
So what I want to do is go to the H2 Doc shortcut on the desktop.
Click on learn basic javascript.
We're going to get control shift and 0 8 and we're going to do assignment operators.
OK.
Close that had already so I'm close at that one right click on the assignment operators folder.
Do new file here and save this as index that each terminal and then type in HD.
No no tab.
And we're going to go to the bottom line 9 a.m. and type in script.
Close it open and close.
OK.
And we're gonna do
assignment operators.
So let's do assignment operator.
So there's a lot of them.
So I'm just going to write them out real quick so equals which is the same as X equals Y.
Now plus equals is the same as X plus Y or plus equals Y
and so this one the plus equals assignment operator adds of value to the variable to a variable.
OK so the equal up assignment operator signs of value to a value to a variable.
So let's write that end.
So we know.
So the equal assignment operator assigns a value to a variable.
All right
the plus equals
Simon operator adds a value to a variable.
Now if we do the minus equals so the minus equals assignment operator subtracts a value from a variable
so you can see if I do this.
I do minus equals
would be the same as X minus equals Y
it's basically a shorthand code here.
Subtract an
now if we did the time's equals assignment operator.
Multiply as a variable.
OK.
So same thing we'll do the Times
vehicles assignment
operator
multiplies a variable
so it would be
X times equals five.
That would be the example.
Then we have the divide equals assignment divide the variable.
So that would be the divide equals assignment operator while just divides variable
so that would be X divided by equal to 5.
And then the last one would be the percent Simon operator assigned a remainder to a variable so you
could do the percent equals assignment
operator assigns a remainder to a variable and it would be X percent equals five.
OK so that's the assignment operators.
It's pretty straightforward.
Like I said it assigns the operator an operator assigned the value to the variable.
So depending on which one you're using.
That's what it's going to signs of it's adding if it's subtracting if it's multiplying if it's dividing
it it just depends which one you're doing.
So like I said this is good for having notes so you can look back on this and use this whenever you
need it.
OK.
So thanks for watching.
I'll see you in the next video.