Hello and welcome to this video.
In this video harby Explaining what her arithmetic operators are and also showing you basic examples
arithmetic operators are operators that I used to perform.
Men take actions or functions on numbers or variables.
Here's a table of some basic arithmetic operators.
So start from the top where we've got the addition operator.
Basically that is used to add numbers of values together.
For example two plus two we've got the suppression operator which is used to surprise at numbers of
values.
Example for some pracht to Mex.
We've got the multiplication operator which is basically used to multiply numbers or values.
Example 7 times 3 in programming and in Javascript multiplication is represented by the asterisks symbol.
Next we've got the division which is used to divide numbers or values.
Example would divide 4 by.
It makes we've got the S which is represented by the percent sign their model models operate or is used
to return the remainder from the deficients and when the vital numbers mother laws will return only
what is left from the division.
Next we've got the increment operator which is represented by two plus symbols.
What that does it increases the value of N number or is variable.
For example if you've got a variable that has a value of 7 you want to increase their value to 8.
He use the call the variable name and then you add B plus plus symbol which is the increment operator
and that will increase the value bound 1.
The positive that is the discriminant operator which is used to decrease the value of N number or a
variable by Y.
So these are the basic arithmetic operators in javascript.
You also find that these are identical to most programming languages as well.
So I'm going to go out to my console and basically show you some basic examples.
Open on Google home page on the Google home page to access the console.
If you are on a Windows computer you press control shift and J.
If you are on a Mac you press command shift and J.
That will give you access to the console.
So I've got my console open.
You should have this on the line next to the word console.
So let me just run through the basic arithmetic operator but first I want to illustrate.
If a basic addition you me already know this already.
Would love apologize if I am going through this again.
So I'm just going to illustrate by adding two numbers together.
I'm going to do two plus two and press enter and that will give you four.
Next let me illustrate this suppression.
I'm going to surprise two numbers.
So for from to press and time my keyboard and that will return the value of two.
Next I want to multiply two moves so I'll do a 7 and Asterix Asterix is what you use to represent multiplication
in javascript and will multiply 7 by 3 Press pentair that returns 21.
Next I'm going to illustrate a deficient example.
I'm going to divide two numbers so I'd divide 8 by 4 and you represent division with the slash symbol
press enter and that will return to.
Next I want to illustrate the model lost operator more will only return the value of what is left after
division.
So I'll do fine.
And the percent to a percent more deloss.
So I expect this to return 1 because 2 can only go into.
Twice and it should be.
Remember one he can say is returned one next.
I want to illustrate how the incremental operator works.
First I'm going to declare a variable called X..
I'm going to give you the value of seven so that if I call that value variable x it will return seven.
So if I want to change the value from 7 to 8 I can use the increment operator by just calling the variable
basanti and doing plus plus twice and that will increase if I now call the variable base.
Maybe I should now return a value off it makes I want to illustrate how the Discriminate operator works.
First I'm going to declare a variable called Why I am going to give it a value or 5 next if I call that
variable it will return to 5.
So for example I want to decrease it to full.
I'll just call the variable based name and use the decrements operator which is two dashes.
Press Enter.
Now if I call that variable y.
Now show me a value or form.
So that's basically how the Discriminate operator works.
These are just very basic examples to illustrate how the javascript arithmetic operators work.
Thanks for watching.
Bye for now.