Welcome back.
I want to quickly talk about something called augmented assignment operator so we've learned that we
can create variables like some value and we can assign it a data type in our case let's just assign
it five there's something called augmented assignment operator that allows us to do something quite
neat.
Let's have a look so if this value I want to increase in let's say 5 plus 2 so add two to it I could
do that or I could even use some value which is already five by the time it gets to line three and do
something like this if I print some value and I click Run I'll get seven because five plus two equals
to seven.
So in memory some value points to seven but there's a neater way of doing this called augmented assignment
operator instead of doing something like this I could just simply add a plus to the equals so we're
going to say some value plus equals two is still going to equal seven.
So it's the same thing as before and this school augmented assignment operator it's a shorthand of us
doing something like this.
We can also change this to something like minus which once again is like subtracting two from whatever
the previous value of some value was.
Now if I was to do this at the beginning here.
So let's just do here and then comment this out and if I click Run I'll get an error because some value
is not defined.
We haven't really created anything.
So in order for this to work we need to make sure that this variable has some previous value so we've
learned about the plus the minus.
And then finally we have the multiply.
Once again if I run this we get 10.
Remember this is just the same as us saying some value times to is just a shorthand form.
All right.
This was a quick video in case you see something like this in the wall.
Now you shouldn't be afraid.
Remember that the operator comes to the left of the equals sign.
I'll see in the next one by.