Now let's talk about the arithmetic operators. There are many arithmetic operators that we might need to use, and I'm going to discuss the most important ones in this tutorial. The first one that I'm going to talk about is the addition. The addition is adding two numbers, two variables together. So to add the first variable to the other variable, is you just use console and then log and then I'm going to add a plus b. And the result will be added will be printed out on the screen as you can see, 10 plus three, the result is 13.
The next arithmetic operator that I need to talk about is subtraction. subtraction is subtracting the first element, the first variable from the next one. So if I subtract 10 from If I subtract three from 10, the result is seven. The third operator is multiplication. And remember the function that we talked about in previous tutorials which is multiply by two, we use the star sign, which is the multiplication sign. And if we save and run, we have 30.
Because 10 multiplied by three, the result is 30. The fourth arithmetic operator is division, which means that we divide the first element by the the second one. So if I divide a by b, the result is 10 divided by three, the result is 3.333. The last arithmetic operator that I'm going to talk about is very minor. The reminder is the result after we make our division and if there is a reminder, we pray. On the screen.
So for example, if I use the reminder simple which, which is the percentage symbol, and if I divide them by three, the result is three, but the remainder is one. As you can see, the result is one. And I'm sure that you have studied that in high school or in college or even in elementary school. And a very important concept that I need to discuss here is increasing a number by one or decreasing a number by one because it is very important in any programming language. And in JavaScript in specific, which is adding increasing the number for example, if we want to increase the variable a by one, what I would do is just type A and then double plus sign, and then semicolon and then I print the variable a, if I print the variable a, the result is 11. Because double plus sign means that the value has been increased by one.
Now if I want to do the reverse if I want to decrease the number by one, what I would do is I use double subtraction signs and I print the a and if I print the A as you can see it was decreased by one. So these are very important arithmetic operators that you will use a lot in your programs, especially increasing and decreasing by one when you deal with loops, which we will get to it later.