Welcome back everybody.
All right.
So let's go ahead and let's do a little bit of math here.
OK.
So we can see that we changed the text to two but guess what we can do with this number here.
OK we can add in plus 1.
OK.
And so what this will do is this will make it equal to three.
Now let's just do a little bit of math and say two and then you'll equal four.
So you can do a little bit of math here and I'm just going to squeeze this in here and don't worry about
this because remember it doesn't change.
I just want to focus in on the javascript for a moment here.
OK let's add in another variable here and we can again remember we can add in as many variables as we
want.
We're going to call this number
or we'll call it second number k for it and make it equal to 2.
So they're both equal to two.
And we can do variable number plus second number k.
Now you'll also notice and move.
So even a little bit more.
If I double click on this you can see that it highlights it and everything works out like that.
All right.
So if you change the tax it equals to 4 pretty simple right now.
Watch what happens if we type in variable name plus second number.
Now in pretty much every other programming language this is going to cause some kind of error.
And the reason why causes an error is another programming languages.
What ends up happening is that you can add a number to a letter it just doesn't make sense.
It's like you know if you're asked if you ask yourself how many apples do we have and you have we know
one Apple plus an orange it's like one but it doesn't really make any sense to the computer.
Watch what happens when we do this.
OK.
It says John plus two is just basically mashes everything together and then there's not really a better
term for that.
It just it just puts them together really that's all it does.
OK.
Now you'll also notice that there is no space for John.
And the reason is is that there is no space here.
Now remember in a couple of tutorials ago I said that space's is like adding another object and that's
partly true except for when you have the quotes here if you have a quote here you can put in you know
10 of these if you want.
It doesn't matter.
So we're going to go ahead space and you can see that says John too.
OK.
And of course let's just go ahead and let's just add another variable and we're going to call this second
string.
OK.
It's going to be equal to two quotes and we're going to call this
we'll just say John plus awesome.
Ok put another space in there.
And of course is one thing that's missing in that is a semi-colon.
OK and of course we change second number to second string K and double click on that.
It does work.
And there we go.
That's all it is.
Now you can do this infinitely if you really want to write.
You can go ahead and push plus
variable number etc. you can do this as much as you want.
Programming languages are meant to be like this.
They're meant to be they're meant to be anything.
Now of course if you go ahead and if we were to just do one more bit of math here I was going to go
ahead and delete this here.
You can do any kind of math you want to.
So we have variable number minus 2 three and then we can go ahead it equals to negative 1.
OK.
That makes perfect sense you can do whatever you want.
You can go times and there you go.
OK.
So that's essentially how you use variables.
And that's one thing that was really good about javascript is that's not to throw you an error it's
going to work out in some way.
However I highly recommend that you separate your numbers and your your your strings in two different
different categories.
And that for the most part you don't really do.
You don't really add them together like I did unless you're going ahead and doing that for display purposes.
All right I'll see you guys in the Tauriel.