How to use Earth Matic operators n JavaScript?

We have two variations off it That’s postfix and perfect That will happen in the same order as we saw earlier Okay Now before going to the Earth Matic operators now quickly just recap all those things and try to do some gamma on it Okay Now let’s see them off these things, Okay We saw while loop right We saw something that was written like this A physical Now let’s say not an if numb equal to zero All right.


I’ll show you something if the number is equal to zero while num is greater than see it All right so that is the case Then what We will do well to console or log right And so Lord log and we try to print a and then what We did we incriminated Okay Sorry We’re using numb So numb plus Okay let’s put numb here Okay You see the expression that we used here was a that you know the expression right You nearly operator that we used it is similar to something like this We saw how to write a comment Right now Mick will toe num plus one It’s a shorthand notation Okay Inclement operator Now if you try to bring this thing right So what we will get as an output that is the last four lines will be last five lines will be 0123 if it’s greater than zero.

Let’s see if it’s less than five Okay now 01234 will be Bring their Okay Now if you started to save this fight then we tried to run this thing Okay you see if you know 1234 That is due to line number 33 If you see the court line number 33 this is responsible for doing that thing right now This is why Luke right now if I just changed this thing right I said to do something right Control Lord log right on the same thing Right on The number itself now numb has a value of five Right So it will bring five right Mm So after that I will write the expression Wild num is less than five Okay Now it shouldn’t print right now is not less than five now is equal to five.

It shouldn’t print it right then we due to inclement here Now it will do this thing once right As I told you earlier right once it will be executed So since even if nama is not less than five because here we have now equal to five So the student be executed Right But it will still be executed We will see Let’s save this file Now Let’s try to run this thing You see five is printed to toe the line number 37 in the text You see like number 37 is this line So life is printed This is the drawback Or something that is associated will do Why you so first do the thing and then try to check if that condition is toe or not Okay this is all about while loop.

Now let’s see what we saw earlier right If you write something that’s supposing I didn’t see That is inclement Let’s see Iitrader idea Equal toe zero Right If you do something here right idea Now let’s try to do this thing Control Don’t log Let’s put it 10, Okay Now let’s try to put this thing control Lord log And now what we did here we just right Idea idea Plus Plus So this is a post fixed increments Right postfix our first assigned the value and then increments right If you see now if I tried this thing right consoled or log here and then I will try to print it here.

What will be the output of this line Will it be 10 or 11 What will be the output of this line Right It will be Obvious it will be 10 Why Because we’re using what post-fixed increments Right So it first increments, It first assigns the value and then increments so the value will maintain And then we’ll be trying to run this thing here It will give us the 11 s out Now let’s see now if we do the same thing right for the post-fixed expression right Or the prefix Right We saw the If you try to do this thing here now it will be 11 plus First it will incriminate That is 12 And then it will print that value right Or then it will assign Interesting.

If you see here then we try to print the idea here So what will be the output here it will be Obviously 11 is gone Then it will be 12 on again It will remain 12 here So what should be the output or what should be the output of all these four statements It will be 10 11 12 12 Right now Let’s save this file on Now let’s see what will be the output You see 10 11 12 12 42 43 45 46 Now we’ll check That’s the thing we saw right So these are all about unity operators Right on Similarly you can do for an agreement operator right in the same fashion Right So this is all about urinary operators.

Let’s go back to our slides Yeah Now let’s see the other The operator that we have is er thematic operators Okay In that operator in this operator section we will have all those er thematic operations like add subtract right multiply divide models exponents Right These are all Earth Matic operators and these for executing these operations we need to operate It’s right It’s a pioneer The Earth Matic operate These are binary arithmetic operators Right So if you see modelers What do you mean being by modelers Basically it returns a reminder Remainder right When is divided by B What It will be the remainder For example if you wrote 65 3 so obviously six is divisible by three So the remainder is zero so zero will be returned.

Now exponents Operator if you see double these double Asterix signs right A double A strict sign This means a to the power of B, for example, to double a strict sign These double a strict twice then to transport three Then the output will be eight Right now if you see the example here was a will to and be equal to five then we try to console a plus B obviously will get 15 Right then a plus b the output of these things right now if you see Hmm Okay If now then we have the decree mint I mean to say this obstruction then multiplication All these things are simple right And then we have division right 10 to 55 We have to write a model s Bright 10 to 55.

We have zero because then is divisible by five And now if you see what I wrote written here then that much duplication sign or if you call it a strict sign twice that is as strict So five That is generous About five We will get what 10 and five zeroes Okay so these are all exponents These are all about This was all about what Earth Matic operators.

Let’s talk about shift operators Shift operators basically shift the bits by specifying number off times in either left or right direction to variations off shift are possible That is left shift and a right shift in left shift We ship the pits and left direction for the specified value The number of times we want to ship them in the left direction Similarly we can do it on the right direction.

If you see we have to wait tables here A and B right So a is eight and B is to Now if you try to shift the pits What a You want to shift whatever is in the A by two bits right I’ll show you the demo It will be clear now when we shift the aid toe to bits the value will be implemented right So eight has shifted to times in the left direction So obviously it will Its value will increase Now if you want to shift the right direction it’s valuable degrees As you see the output is 32 on when we shifted towards the left on the output is too when we shifted towards the left and right-hand side Right So this is all about shift operators Now let me show you first move to the relational operators.

Leave a Comment