Hi coders so now we have our JavaScript Starting in the series with Chapter Two Inside Chapter Two we About operators and conditional statements I must be learning as much as we do now. The chapters are on this channel. Available here inside the playlist So if you need JavaScript Do you want to learn a topic first or later? When this playlist is updated If you want to learn any topic later, then We can access it from there. Hi everyone so now your JavaScript We are about to embark on a journey of In Chapter Two of our Chapter Two, we Read about operators and conditionals Statements now in real life Inside we have many conditions for our day to You must have seen it in day life, for example, if Should we go to get our voter ID card made or Then if we go to get our license made We need the age of 18 plus, so this There is a condition to get your license. For this our age should be 18 plus We were promoted from first class to second class. I have to go from second class to third class. If we want to go, we should have whatever marks we want. Those should be passing marks so that is a The condition is to upgrade your class This is how to do it in real life. There are many such conditions inside too. Which sometimes we need to include inside our code to bring your real-life websites inside required and similar conditions To implement this, we first operators and then We will learn how to conditionalize You can now use statements. There is another topic before conditional statements The one we're going to touch on is called comments inside JavaScript The part of the code that executes It doesn't mean that if we write something like this want one that explains that What our code does is work but that code If there is no part then we can use it in JavaScript. within programming languages Comments says now write a comment First, let's start with our basic code. Let's set up what we've done Same old JavaScript name I have taken the folder now, there is no one inside it. There is no file in this folder, we have created our The inside of the computer is also opened visually. This folder is currently empty, so Visual Studio what will you do from the code inside this create a new file We will create this file and call it index.htm The last time we talked about index.htm I talked about an HTML5 control and By pressing exclamation we have this The thing will come i.e. boiler plate code we will call it boiler plate means to say something I will also tell you the spelling in the basic code. this is called boiler plate code which VS Code can automatically generate it for us. Let's also give you another file We will create what we can call 1js of 1js Instead, let's call it our script.js So this is our script i.e. JavaScript that the jade file will come just from the body tag Let's create a script tag later. We call these tags inside ATML. Tags tell you what you want to write. like the top of a web page or the entire Anything on the website The entire thing should be displayed. Comes inside the body tag but for now We don't want to go into much detail about tags. What we will do inside the script tag is this We will write a line in this manner: Source end here We will name our file script.js If we save this, then basically this is ours Command and plus to enter html.com I zoomed in by pressing the You have to do this if you are on Windows So you control and plus one which is our The sign appears by pressing it on the keyboard. If possible, this would be our script tag. Gaya now com to write comments basically are those parts of our code that never What should I say if it is not executed? I mean, for example, I wrote here console dialog here write hello World, this is how I wrote a line Save it and save it in your folder. When we go inside, this time we have two files will be exeed If we do it in, we have zoomed in. What is getting printed here? Hello, it is coming printed for us. World, now it has come on Hello World. If we put two doubles in front of I put a slash and saved it and went If I refresh, what will come this time? We will not receive anything in print. So basically this is the part of the code now. Which will never be executed, which will never run This will not happen generally whenever we comment If we write then we double in the comments starting with a slash so now we're here You can start writing your comment here. So this is a comment now generally about comments Inside we are not writing code, comments Inside this we can use normal English or if we want this in this way hindi how are you in this way We can write things in Hindi also but Generally we prefer to write in English. Because coding is something that is Global end many times you are using such coding will go into the community where perhaps If people do not understand Hindi then maximum people would have been communicating in English so this is a single line comment do There can be a number of comments that will help us Write within a single line this is a Comments Generally we use comments To describe your code, what is our code doing so if I Tell me what this code of mine is doing. For that we can write a comment above This code prints Hello World. Save it. Let's refresh it, so what will you do now? It is printing Hello World and the same thing I have done here in my code I have described it inside the comments If we type anything inside We make mistakes, anything random. If I typed it this way, it What it will do is to use the method above our code No difference to how the code will be executed It won't work as if I refreshed my code. It is still working but same mistake If we had done it in the actual code without When I saved the comment and refreshed it, this Sometimes we start getting some errors. If we go, we will see the random things that we You can write in the comments but you should not write We don't want clean comments either. You should keep it like your normal code Let's assume our single line comment is gone Sometimes we get to write some great comments. If so, in that case our comments Multiple lines lead to this is a code Like we have to write this is a code that Prints Hello World on our console window If I find the comment too long like this If you want to write it, then either the method will be that two single This is also the way to write line comments That's right, we have no If the error does not come then our second method It happens that we write Slush Star this Slush Star in a way so our new one The comment starts and this comment can go to multiple lines so if a once we type slash star then our All these things will become comments and we I want the comment to end where it is. We write the slash again here. We will write star slash like this This much part will become our comment. Let's save and refresh our code. It will still work without any error then this We can write comments anytime in this way any part inside your code To describe any part The next thing we'll talk about is These are our operators, now the work of operators It happens inside programming to perform Some operation on data and one more additional thing I'll tell you here once We learned about operators in JavaScript. We have learned the conditional statement, then Even if later we go to C++ like Java are using languages like Python Same logic applies there too. So of conditional statements and operators Any one programming language You will learn this topic everywhere. It will be applicable and is helping us everywhere. If there are operators then some operations on the data Let's help you perform now What is an operation for example maths Inside we would have read a + b = c in this way We might have read some statements that 4 + 5 = 9 We may have read statements like this Whenever we write something like this a + b So here we will explain this entire thing. It is called an expression in math. In maths it is also called expression and This can also be used as an expression within programming. and within the expression that we are variables or if I wrote and + 2 So these will be our values What do we call them? operands and this plus sign Its function is to add two numbers. We call this an operator, so what does an operator do? The operator is doing some work, what work? this operator is doing this operator Addition of two numbers is working so like we have plus operator, similarly we have The minus one is also an operator, multiply There are also many different ways in this way. Programming has different operators The first category of operators within What we will talk about is what we call Apnea erythematosus Erythematosus means what we get in math If you help then you are already in maths We may have seen many of these The most well known is our Plus operator Minus operator Multiply operator for which We use the asteris symbol, i.e. the star symbol. and our divide operator in Implement all four at once and see Let's first leave a comment. Here we're going to learn about our Aerith Erythematosus I will do the dlog, well here in the console dlog Let's create two variables, let a equal So let's call it f and let be e equal to let's call it So here in this way the string Inside we can write a p b if I If I just write this, will it get printed? We will get the print a + b because Things inside strings remain the same It comes printed but if we have to write it a + b is equal to something, so this will come out to be a + b Equ to something but if I actually I want to print two things at the same time. If we want to print it, then we can use comma for that. We can use it and we will write it between commas. a + b so what will happen in this way a + b The value will be calculated here and then that The value will be printed to us. Refreshed and we got a + b e What was the value of equation 7 a was 5 b what was the value 2 was 5 + 2 what do we have It happens to be equal to 7 if we wanted to It can also be saved inside another variable c. and then print c You could have saved and refreshed it too We get the same output but if we want You can also print it directly in this way. If we can get it done then this is our a + b In the same way we can print a - b a - b will become a - b if refreshed It will be equal to 3 here together we Let's print the values of a and b. Kasol Dialog a = to get printed here will give the value of a Comma and be equal to and print here If we get the value of B then we will get the value of B in console. It will also appear that inside a the value of b is 5 The value of is 2 so 5 - 2 we have will be equal to 3 if we multiply If you want to do it, copy this. To multiply, we use multiply. Symbols used which are the highest risk Symbols will no longer be multiplied here. Multiplication actual will be saved here If we refresh it then a * b = 10 This comes to us I copied and pasted it after dividing it. So we use slash so a s b That means if 5/2 is refreshed then 5/2 is ours If it passes 2.5 then we have its value Once printed, these are our four basic There are operations in Eryth Something additional than these in programming And these four are used in maths. but inside JavaScript we have Extras are seen in one of our The pass operator is the modulus operator The symbol for the modulus operator is percent. sign if we ever wrote a modulus B means that when A is divided by B If it happens then whatever reminder of them remains will be taken care of. The value of the reminder should come to us For example, if we divide f by two Did it happen when ours is divided by two? If it happens then in that case our accent will be saved. From here four went to us in the last What reminder comes Reminder comes One So what will the modulus give? modulus 2 or this f modulo two can also be called this value is going to be equal to 1 so we have One will print this thing here You can write it as kasol dolog or infact it Let's print the complete value of a modulo b We will have a value equal to 1 save. If we refresh it, then this is a modulo b We got one, that is, two numbers divided a is being divided by b So the reminder that will come will remind us modulus gives second we have another operator hota hai which is used for expo Anson's exposition means giving the power of math Inside we had read the power a to the power b That is, if we write 2 to the power 2, then This means 2 * ba 2 2 to the pa 3 write Diya means 2 * 2 * 2 3 to the If we write Pa 4 then it means 3 * 3 *3*3 So this is how we do it for him Two Est Risques Here for Expo Anson That is, using the sign of two multiplied If we wrote down a expo b so that means a to the Power to do this thing what we can Do is let's copy this and here But let's use two est sc, copy this Let's take it and paste it here. Now what does this mean, it basically means That would be 5 to the power of 2 and 5 to the power of 2 what is the value 5 * ba 5 which is equal to 25 so this should give me an output Let's save 25 off and refresh So this value will come to us as 25 Equal, now this has become our normal Operators generally all of them Operators are these two operators. Let's try to work on two operators Meaning, if they want A then they also want B. If you want to add something then you can also add a b must also be if some power If you want to give, then a should also be there, b should also be there. But we have arithmetic operators There are two operators that are Only a single operator is needed, this thing math We don't get to see this thing inside specifically looking inside programming That is why it is unique in We call these operators unary operators. We have two unary operators Inside JavaScript, we have a The increment operator is one of our Decrement operator Unary operator The symbol for the increment operator is plus. The symbol for plus and decrement is minus minus if I wrote a + p then In programming it means a + 1 Both have the same meaning in JavaScript. and if I wrote a - So this means a - 1 of both of them It also has the same meaning, so basically we can write a as a - 1 We are giving the value and here we can write a as a + giving 1 value so a single which a If we have to increase it from forest then For that we can use plus plus And if we want to subtract from one, then for that we use minus You can use minus, this could be First time seeing unary operator A little complexion doesn't matter It is very easy to use and In fact, this is later called a loop. If you study the topic then it will be on day to day basis Basically use it inside JavaScript If you are doing this then please call the operator once Let's see, let's create a new heading. Called Yeri operator and the entire part of this whole we You can comment out. You can comment out. What we basically need to do for If we press command and slash together Yes, this is the shortcut to everything. Comment to comment things out together Now we have nothing to print It won't happen, but we need to print this first line. If we want to get it done, we can get it printed. Are they or in fact, comment out on this And let's comment this out as well. Let's paste both of these here. Let's comment out, we have saved it now. Let's talk about unary operators. refreshed we have these two values Now for example, I have used a and b here. Write a = a + 1 and then adjust the constraints to get Printed the value of a now that we know it The value of a here is f as soon as a + 1 = a will be the value of a + 1 6 and it will go inside a and get stored, so Here the value of a has become six. Equal to here print also six hona Should I have saved it or should I have written it here? are a = Saved, refreshed, and it came to us. a = 6 Now the shortcut for writing the same thing is The method is a + + simply write a + + Apply semicalculus and then when we convert a to If you get it printed, its value will also be 6. Saved, refreshed, we still have a = 6 came Similarly, if we were to write a = a - 1 then We could write it like this, so here when a would have printed the value of a first The value was F, here it became four, so our Pass for print hoke aata saved kiya refresh So we have a = 4 so let's write this Another way is a minus like Wrote a my minus and refreshed it even then We will have a = 4, now that's it. Increment and decrement means its Apart from this we have our plus plus and minus minus It can be used in two ways, one what happens is that we write a + a what happens is that we Write a + a + a both are valid a happens that We write a minus minus one, so we Write minus - a, both of these are valid. We say post increment post i.e. Later we call it pre-increment Pre means first, we call it post decrement and this is what we call pre Decrement their names, by the way, we still have the truth No need to remember that with time We will gradually remember Po Increment says that earlier if now this Inside the line within which the increment If there is any work going on here So the value will not change in that value. Pre-increment will change from the next line He says I will change the value first. After that the work will be done post later value Changes the pre already changed value Gives for example print here If we do the work of getting it done in one line What should we do? We can get it printed here. I will get one printed + + a So what will be the value of λ + a equal to 0 and write it down plus p a Plus Plus says first I change the value I will do it and then get it printed because here If the work of getting the print done on Here five is the value of the first five. There will be a change, it will become six and then the value Six will come to us in print. When we refreshed, what did we get? = 6 right here if we had done a + p then what does a+ p say a+ p says first I will do the work I will do it, that is, I will first print the value Then if I change it, what is the value first? will be printed if the value of a is five then that Only five will be printed and then it will become six. If you go and refresh later, this This time we got the value of a + p as five. But if I print inside the next line should I console.log a = here if a got the value printed so now because of a If the value has changed then it will be printed If it comes out to be equal to 6s then it says a + p First the old value of this line will be used Whatever work is being done in the next line inside From there the new value will start being used. If it happens then here the old value It will be five but the new value here is six It will come to us in the same way. Our post and pre decrement works is for example if I write - - a and here We will get it printed on it - - a then minus - a says the first value I will do minus minus, that is, five becomes four. If it goes, we will get it printed and next We will have only four printed in the line also. But right here, if we had done a minus And here we print a - mine so a My minus says I will do my work first. i.e. first print the value of a I will get five printed and then I will decree it. If I do it then this line will be decreed. It is not reflecting inside. will be reflected from the next line when a key When the value is printed, we will get four. So this is a little bit Post and pre in complexion Concept but need to take more tension No, we will go further into the chapters. If you see many examples inside then one After a point, we will get used to using them. There is nothing to do, just practice a little. Take it yourself, pause for 5 minutes and let it cool. If you think with your mind, you will easily understand. So all these operators would have been ours. have erythematosus Next, let's talk about these operators. These are our assignments Operators assignment operators work is to assign values assign values that is Assign any value to any variable To do the most just assignment operator we I have already used which is equal to equal to 5a = 5 if we wrote So this symbol of equal to is ours. is an assignment operator means that the value of f is assigned to a variable inside It's always happening when we're programming Let's talk about JavaScript. If we did something on the left side like this It is written equal to it is written right on the side so what does value always Value from right side to left side It is a propagator, i.e. from right to left Now we have more besides this There are assignment operators, one is Our plus equals two plus equals two say It means if we write somewhere Given a pi equi So this would mean a e a pv if we wrote Given a = 4, this means a = a P4 Basically a way to write the same thing The short way, a compact way, we call it Might as well take a look at this one time. As comment out all of this and this too Comment out and copy it And let's comment out Next Let's start your So assignment with assignment operators First of all, within the operators, it's our The variables are a and b, so now we're here We're going to write a + = 4 now if we want You can give a space in the middle here. Wali spaces humari aloud hoti hai but plus And do not give space between equal to Because what this is is a sem operator So this requires us to write together so a a + = 4 means a = a + 4 and a what is the value of pa equal to b is 5 + 4 will be equal to 9 then the value of a will become 9 How to verify it will go to the next line Let's print a = a then we have Do you know what value should be printed? The value should be printed to us. equal to nine let's save this And let's refresh it a = 9 in the same way If we want, we can make it minus equal to are mine equal to when we did it means a - 4 will become 5 - what will be the value of 4 1 K equals saved, refreshed, verified It's done the way we want it to be You can multiply here. If we write it as a multiple of 4, that is, 5 * 4 So we have equal to 20 saved. Refreshed and verified it is equal to 20 In this manner all Arimilli I have written it now what is 5 modulo 4 that should be equal to 1 when we divide One will come in the reminder from four on five Divide and refresh the answer is Equal to 1 Expand in the same manner Can Yes, we can do exposition here if we want. When Expo Anson will do it with the Five Fore ka to it will be 125 * 5 I think it should be 625 Let's check the answer, what will come, refresh So yes the answer is 625 so in this way All of them are Arithmetic operators We can use these for our assignments. Next operator in the form of operators These are the ones we'll be talking about. Our comparison operators do the work Comparing values like our neighbors Share our marks with your children In the same way we compare it with Pay comparison operators are used to Compare two values now two values anything Values can be for example give me Numbers to be compared One number is a = 5 is the second number b = 5 both if i Compare to see if both numbers are equal How do we write for that in math? If we are in maths then we write a = b We find out and not equal to what do we do for a no = b this is The Math Life is now a JavaScript Life What happens in life is normal This is equal to two, this is our assignment. If he becomes an operator then he will be asked for comparison. If you can't use it for this, then that's why For comparison inside JavaScript we Write double equal to and not equal to For we put up our exclamation sign and for this, exclamation and Then equal to this we call not equal To wherever not we have to write Inside JavaScript or In General Maxims within programming languages what do we write inside for not If you use exclamation then most First let us check these operators Let's do this part, we comment out. Let's also comment these out by copying them. Let's take the next one here. Let's write a comment for our comparison. Operators save this now. First, using comparison operators We are going to check out Kasol Dialog and Dict what will be the value of b now here a is equal To equal to b, we are basically saying We're trying to make a equal to our b. So this comparison operator will give us Will tell whether we are telling the truth or lying? If we are saying this then basically we are trying to say Are doing my equal to equal to tutu is equal, then whatever our comparison operator It is always one of our results. Returns a boolean value whichever is larger than its A statement is written for that either he Will he return true to us or will he will return false to us or we can say Five is equal to two And then we compare those two people. If so, obviously we have false It will come back, let's save it and If you refresh, 5 = two equals two for we will get falls in the same manner if we Change the value of b to 5 and then I'll refresh the bar, let's turn it up to five. If we save and refresh, this time our pass will return true in the same manner Like we have equal to we don't You can also check equal to i.e. here We made a statement If we write that the value of a is not equal to b then What we're basically trying to say is Not Equal To 5 Obvious These Statement Juts If yes, then it will come to us as false print. Saved, Refreshed, F is not equal to 5 is a false statement and right here if If we had two, here we would say trying 5 is not equal to 2 How are you trying to say this? From the expression it is just as we said it is I got it printed, who is saying this? There has been an expression and this expression is true Is he saying it or not for us? Our comparison operator will tell us here. We will get true return because Obviously, Fi is not equal to Tutu Refresh. And here we have True Print Now whenever we have a comparison operator has an interesting inside it thing happens if we have a for here I wrote five and for b also we wrote five Give me this five string one If there are five, then we know the first five. That is, a this is equal to a number and this which is second this is equal to a string We have already read about data types. I know this is number one, this is a is a string and by law one number is too many All of our codes can be such that we Don't want the value of a number or string It is equal, but if I wrote it here f or a equal to equal to b and in that case If we check, what will we get? We will have true returned and save it. will refresh for a == b The comparison operator returns true. I gave it away so it becomes possible in JavaScript because when a string If there is only number inside then implicitly What does JavaScript do automatically? Convert the string inside to a number first and then this number with this number If you are trying to compare then this inside string five convert hoke and Then the number five matches the number five will do it and it will give us true but we We have many such cases. In which we don't want string and number If equal comparison can be done then for such cases We are using the stricter version of equal to and not Let's use equal to and for that If we write triple equals two, we can say You can say this is your strict version and Will check more strictly i.e. double Equal to so what did it do only to the value Used to check what value is stored inside is triple equal to data type for us He also checks this, he will check it beforehand that strings and numbers are never compared should be or some other value if They should not be compared now. So what we can do is just here for us Triple equal to two has to be applied and no change Don't bring us along. Saved and refreshed. So in this case we will get the return False like we have triple equal two Similarly, we have nought and double If it is equal to then not and double equal to We can use it this way Refreshed we got True Return This is the stricter version and generally within JavaScript whenever We need to compare the values unless And the police want to give me data. There should be no discrimination on the basis of type Compare even if the data types are different two then we'll use double equals two no So in maximum cases we have triple equal to Apart from this we have more are also comparison operators in which our Greater than becomes greater than equal to Less than and less than equal to each other Let us see some examples here a = Let's keep 5 and let's keep b = 3 First check for A greater than B or basically What we are trying to say is that 5 is Greater than 3 we know 5 happens than three Greater then for that we have True Return It will happen, saved, refreshed, this is Equal to true and this is where we do our lesson. If we give it then we will have a false return Come refresh yourself, falls right here, we less than Equal to kar dete and let's make be equal 5 Saved Refreshed This should be = 5 If refreshed, it returns true to us. It has come and it is here, greater than equal By returning that true to us for two also Will save, refresh, true came We can also change the value here. We made a into six, so here Six will be a saved refreshed This also returns the true value for us. If he gives then all these things happen Comparison operators that compare two values Apart from this, they also do the work of comparing One last type of operator we'll be studying What we have are logical operators Logical operators are a little different from comparison operators. Are there different comparison operators in C? converts one value to another Logical operators on comparisons By evaluating multiple expressions Final Answer and Logical Operator We also have answers which are either false or false in the end. returns true or returns true logical operator says Assume that a person is telling the truth What it did was return true. There is any person, we can code this inside The expression can say a man speaks the truth And the other man is also saying the truth, let's say If he is doing it or if he is lying then it depends What is the output of both of them as final answer? It should be if we have this method If the situation arises then we use it. Use your logical operators here first. First let's talk about our logical operators The logical end of the logical end tells us if we have a situation in which We need to check that condition one is true. and condition two is also true then only we have The final answer should be true. That means the truth should come out in this way if we If you want to establish a condition then For this we use logical AND. And says that I will give the final answer at last. I will give True only if I get the first value as well I will get true when the second value is also true. If I get it then the logical end says that my All the details for the final answer to be correct The values must be true, which is a Let us see an example. For example, we here at Let's comment this out. Comment this out and let's comment this out Here we will write our logical operators. And paste your values here. Now let's make it a variable for example are condition one condition one is saying a is greater than b now we know a is our than b If it is greater then what is the return on this value? This will return the value true. But we created another variable called condition. Two condition two says a is equal to 6 now We know the value of a is equal to 6. So what will this also return to us? will return us true so if we print I want to get Kasol done with condition one and end Condition two, then what he will do, we will see Is the first value true and the second The value is true if both values If it is true then that final answer is true for us. If you return it, otherwise we will have to pay the final amount. If even one answer is returned as false, If the condition becomes false, then the condition here One and end condition two we can write this Keep in mind that there is no single end use here. I have to use a double ended single ended bit JavaScript has wise operators Inside bitwise operators in so much detail I will not read it because there is so much frequency. When condition one was true, condition two was also true But if we make one lie, let's suppose I Right a is equal to equal to 5 so here I know this condition will be false like this In cases our end and us falls He will return it and if we have done this If the first condition was made false, it would have So let's make it six, this is true but We've done this less than a less than b and this We have false now, false and true. For this we will get a return of false. We can actually create a table for this. For Example this is my condition one and this is Our condition two and this is our final Result Now condition one can be either true or condition two can also be true, this is a It could be true, it could be false. It could be false, it could be true. There may be falls, there may be falls Only when it is true and true on the basis The result will be true and in case of else In all cases our result is false. Going to do And these conditions are directly addressed by us. You can also write here for example a < b We can write this here and a = Equation c, we can write this here as Both the variables are extra variables. We can delete the saved and refresh it. The same result will be printed to us. So write your conditions directly here. It is possible now to explore the next hum I call my logical R as logical R that if either of the two conditions If it is true for me then I will give the final answer. I will return true so if we create a table make If it turns out to be logical and will speak for us, if If even one of the two is true here then If both are true then I return true. I will give one true, even if one is false it is still true I will return one false and one true. will also return true both are false Only in that case I will return false So if we are given this kind of condition One of the two has to be checked If it also turns out to be true then it means the thing will be true. So in that case we use logical AND Is its real life something like this? An example could be for example we Which is a < b, so we're saying 6 < 5. is false and a tr = 6 is true so here false and let's do it and false and And what will True give us? This True will give us. When I refreshed, this time it was showing us true. He will return it because out of the two Final answer if only one condition is true We will have one thing that returns true Remember this is what we were printing. yes rr this is basically a straight line Above our keyboard it's called a pipe We would have called this symbol the pipe symbol. If yes, then by pressing this symbol we can Let's write the logical AND operator here also as two You have to write it once, if you write it once then it will The bitwise operator will become AND and the third logical operator we have logical NOT That is why I said in the beginning that wherever The exclamation should appear in JavaScript. I have to read it as it is not logical, someone says it is not If he is giving the expression true, right? I will make him fall and anyone else fall If he is giving then I will make it true. The logical NOT always reverses this thing You can also check that logical NOT is the same Expression is needed for example we have this Expression a < b Now we know a < b It will be giving us falls if we do it Give it a note and put it in pennies are a < b here write not of a < b or 6 < 5 saved and refreshed How will we get true in the final answer? If true 6 < 5 is false and the probability of false is If the opposite is true, print true. Given here, if we enter any true condition would have given let's suppose we had written a tr = 6 in that case this value would have been true Should have been a true print but not his It will print the opposite, meaning it will give us false. If you print it, then in this way our Logical operators work Now we have learned this in JavaScript. For operators, we can use basic math basics. Expressions can be evaluated on Why we learned the operators Operators learned so that they could use real life If we need to check any condition inside By writing code inside JavaScript then those We can check the conditions and the conditions To check, we use JavaScript is a very powerful thing. Which is called conditional statements The job of conditional statements is to Implement some condition in the code for For example, we have dark mode on our website. want to put mode that our light mode The website should still be working or dark. If it should work inside the mode then for that We can create a variable called mode and We will check the mode, the value of this mode What if the value of mode is dark mode So what will you do in that case with background color? We can set the black and light mode is the value of mode then in that case We can set the background color to Light is different in this way. There are conditions inside the code whose basis But we may have to take some decisions for Example: Look at its real life situation In real life we know that if I need a driver's license If you want it then what should be the age for it For that the age should be 18 plus, so there But the condition comes that if our age I am over 18 but still we don't have a license. In case the age is less than 18 years We might not be getting a license or Talking about the voting age, if the age Value is greater than 18 only then we can vote If you don't get it, you won't be able to vote. Our total marks are greater than We are 33 only then we will be able to pass the next If you are unable to attend class, we will be in the next If you are unable to go to class then try this method There are conditions which we sometimes need to define in the code. If you have to represent inside then for them We use conditional statements. Now conditional statements we have generally There are three types, the first of which is The first one is we have an if statement. The function of a statement is to define a condition To check, we write if if one of our is a reserved keyword and then pennies This is how we plant pansies, meaning these Then we write our condition inside the brackets. Let's give the meaning of condition basically Some Expression We wrote some expressions Given whose final result is either true should return false or false if this The final result of the expression returns true. If so, what will happen in the case of true which Inside, we then made a block, curly. By creating braces and whatever is inside this block The code must be written and then executed. but if the final result of this condition If it returns false then this code will never execute. If it does not happen then in this way our if An example of how the statement works Let us see a very simple example. You will see, we are going to read it here now. Example conditional statements Let's suppose we created a variable called edge. We have placed a value on 25 Now we can check if our age When Greater Day turned 18, we went to Kasol and did a dialogue. You might be getting it printed, we can write here can Vote can be printed only if the age is greater than 18. It will come, you can vote or you can write it here. Yes, you can vote and save this now. We know our age is 25, so 25 Greater than 18 what will be evaluated here What value will the expression return? The expression will give us the value true. If true comes then this thing will execute for us It will be saved and refreshed here. Coming in print right here on You Can Vote But if we make it let's suppose 16, it would be saved. Refreshed, this time nothing got printed will not come here we can write another condition If age is less than 18 then it is greater than It is equal to 18 if the age is less than 18 So here you can copy paste Can't, can't, vote saved, refreshed So this time it is coming in print, you can Not vote so this way multiple if We can also use if statements The work of the if statement is to Checking the condition, based on the condition We need some final output, some final result. It prints it and this is where we put the edge If you had made it 18 and saved it and refreshed it, then In this case, you can vote because this The condition is that it matches with this but its If we turn off our dark mode Take this example and comment it out. Let's take a look at the dark mode examples. Suppose we create a mode variable mode Inside the variable we have written dark And creating another variable let color color Colors are not giving any value right now inside What is there right now is empty, so if we want, we You can check that our mode Value is that should be equal to dark if If the value of mode is dark then in that case This is our color variable, what value do we assign to it? We want to give it value. that our background color should be black But if the value of our mode is light that We want to view our website in lite mode. In that case you want the color to be the background We want to keep the color white and what will we do in the last console Dot Log We will print our color. variable that finally what color variable If the value is set then this is our Proper is a code which we have written like this what is happening inside this code Inside we have a variable called mode which There is a dark value inside and there is one more color. Which we have to set if our mode is If its value is equal to dark then that The color of the case will turn black if the mode is The value is light, in that case the color should be white will be saved and refreshed mode now If there is dark mode then the background color is black We will learn a topic called DOM later. From that we actually get the color of our screen. You can change the white screen that appears. We can only change its color. Depending upon this variable value We don't have to go that far in advance yet. We're just slowly learning things. So we changed the value of this variable. If I had turned on the light right here, I refreshed it and this time the background If the color comes to us as a white print, This is how our if statement works It is like our if statement Also we have another type of conditional The statement is called the FFL statement. If Elsewhere inside If Else we would have We would have added an ales to that. If Else says that if the condition which if There was a condition inside and he gave it true then So the if part will run and it will return false. If you give it then the other part will run for Example, here we have written that if the mode If the value of is dark mode then the color is black Let it happen if there is no dark mode or something else If yes, then change the color to white in that case. This gives us the if statement again and again. We don't have to write one if we write true and The false case leaves us with a per So we use if else for Example here if the value of mode is dark If so, then in that case the color should become black and What should we do with our colors in the case of Elsa? Make it white, we can remove this part Let's save it and refresh it. Why did he come to us here? The value of light is what it saw dark There is a mode, if not dark mode then all the rest What will happen in cases where the color will turn white If we did anything here, Blue would Even after saving, we still have white Why did it come in print because it was just Checking that dark mode is not enabled If there is anything else, then color in that case Our white will become this example as Let A is equal to Let's Make It 25 If the value of our age is greater than equal to 18, so in that case we will be printing In cases where Vote Else, we can use console dialog. I will get it printed and note Vote then if once match with condition if If it happens then the part with else does not run I will refresh the vote after it has been printed. It's not just that both will be printed, but If we had made it 16 right here, we would have saved it. I refreshed and the not vote was printed. We cannot write Also Else without If. Like if we repeat it again and again and again anything inside the do anything statement we We can write, but if we simply want to write that if something happens inside Elsa, then it will give us an error that the declaration and Statement Expected i.e. Else Always If comes with the same as without the if we have If it does not come then in this way our If Else works now here we have another example can see which is that we find out Whether the number is odd or even, any number If you would have given us your number, let's suppose If we've given a five, we know this is our odd. number if we are given the number 10 this We know that our number also comes to two. Even is four, even is one odd If three is odd then do it this way Some numbers are odd and some are even How do we know if there are odds or evens? Do you know the number that is divisible by two? is an even number and the number which It is an odd number that is not divisible by two. being divided by two means that A number completely divided by two is zero Give me the same in the reminder, the number is complete There will be a division, if someone cries after getting divided This means that if we have any number a If it is in modus with two in modelo What should you return to us and give us zero? If you return it, what will this a become? This a will become our even number, so one Condition is odd inside programming and to check the even number that any number x if we have x modulo 2 If the value of finally equals to 0 then In that case, what it becomes is an even If the number is formed then this expression here We compare it with zero and see So in this way we can check any number. Can any number be odd or even This is our number, let's suppose ours Pass number is 10 we can check here If the modulus of the triple is equal to 0 is equal means reminder of this value to When you divide the number by the reminder If zero becomes equal to 0, then in that case we You can print console dialogs In even and other cases we get it printed You can also dial and save it Refreshed and we got it even in fact We can get the complete print done by writing here. can moist comma and here is Even end can be written in the same way here It's odd, saved, refreshed here. 10 is even is coming in print right here If we had a sane, we would refresh it. yahan print hoke aata sen is odd 15 hota Even in the case of 15, 15 would have been printed. is odd and 20 then print in case of 20 If it happens then 20 is even then this is our way Whether any number is coming odd or even We can also check its condition using Some logic, we have to use some logic On what basis should the condition check be done and then We need to know our normal If Else syntax. Good syntax would be a term inside programming that you repeatedly Any syntax can be seen Complicated Rules of any programming language is called its syntax, like English inside we know at the end of the sentence You will have to write a dot here. also we know any statement if we I am writing that you have to apply semicalculus there. Do we need anything after what we have? I have to write some condition if I Let me write directly like this if else here I wrote something like A B CD in this manner If I give it, what will it give me? It will give me an error. Here he is saying a few things. There are some rules against which you can go. If you have written A B CD then every Language has its own rules which we Its syntax says next we move on We are going to have our third type of FL Which is Else If statement side Statements are basically equivalent to the Else If statement. What happens is that when we call our if statement We write a condition inside it. For example, we can check here Pay condition one checked and then We created the if block and then we If we write 'Else' then what happens to 'Else'? If this condition is not true then this Do it but sometimes we have multiple conditions I may have to check for example One condition one may also need to be checked Condition two may also have to be checked. Condition Three may also have to be checked. Condition Four You may also need to check if it contains The background color may seem dark to you. should you have dark mode In light mode you will see the background color Do you want blue or background color? Suppose if you want pink then there are these four conditions In cases where I have to check Instead of writing if again and again, we have one happens else if statement says else that if the if statement did not work If the statement doesn't work, then If you check Else If, then here we are with our Else we will check the if statement which is our If we have it, we will check for condition two. Here, by writing Else If, we pass our condition to Check it and then make a block of it And no matter how much we want, we can keep writing El Saf. And then at last when we have Else if we finish then at last we You can write your els so generally this Before the method we have the if statement Then we have the Else Ifs whose Inside we can check more conditions and If none of the above conditions match If so, then we have Else after that. In which we write the final answer. Like we checked here that if edge less If the date is 18 then print it in that case Junior but not less than 18 years of age In that case, check whether the age is greater than 60. In that case, print it senior and if If it does not match either of the two Meaning if the age is between 18 and 60 In that case, print the middle one in this way. We have checked all the Mall conditions from Here we can check through the example Here is an example of Let's Choose Our Mode The value of mode or mode can be anything. For example, we have dark mode and We have created a variable called color and now we can check it. If the value of our mode If it is equal to dark then in that case we have We should have the color of our background. should be equal to black But else if by doing it this way we get a And if we write, there will be a space in between. And here we check our second condition. i.e. the value of mode if let Suppose it turns blue, then in that case we want We also have the value of color to be blue. should and another l safe we want to feel Can be used if the value of mode is pink Gaye let's use a triple equal to every If the value of Wear Mode turns pink then that In case we go to our color value should also turn pink and one at the end Else case can give that in last and some more If not, you will need to set the color value to white. to do Let's make it equal to because color is a variable save it and last I would have gone to Kasol and done the dialogue. Are Saved the color, right now the mode is dark, so its If it matches then we have it in color Dark will come, refreshed we will get Black Now here we have changed the mode to blue. If we had saved and refreshed our Blue color comes near us if we press the mode Let's suppose we would have done silver anything We just kept the mode that matches these conditions. Do not do it if it does not match these conditions Finally we will get white only. Saved. Refreshed final color has arrived Equal to white so in this way if in the middle If we have to check multiple conditions then For that we use our else if block. Now let's do it inside If Else Suppose if we have such a case In which we just have to write the if statement Or we have one to get done in the block This is the only work, single work for example, I wrote if my mode value is dark then In that case I need to print the mode itself. So here's what we can do without one of our own. We created a block and created our own single Can do line work for example I have to do the same line of work if my If the value of Mode is equal to Dark, then that In case of printing the value of mode then This line will not give us any error. We will save and refresh here if I set it to dark saved and refreshed This black came and then I had dark If it comes printed then in this case this line No one will give us any error and this way We can also write statements like this This statement will work only when After the condition becomes true, we only get one The work that needs to be done can be anything. That task is to assign a value to a variable. It could also be that you get something printed. This statement can also be in that case It will work but generally in this way we won't write your own code because well This is not a professional approach, generally we want it. Do we need to get one task done or many tasks done? We always want to use our blocks That is, in this way you will curl your curly hair. Inside braces we write our entire code. If you are going to do so, then statements like this They are easy to understand It is easy to read plus there are many There are companies that internally follow this convention Follows this method, follows this method Now is the time to write your FL statements. So there we have our conditional statements. With help we can check many of our Now we're going to revisit Which is a special to another operator of yours? operator called ternary operator ternary operator Why is a special operator a special operator? Because so far we have used such operators See the two operators who work on it Two operands i.e. a + b Both a and b operands are we have also seen operators like this who work on an operator our Unary operators like our a p p a minus minus is gone now we'll see An operator that works on three operators does and what are the three operants three One of the operands is our condition and We have two outputs, which are ternary. operator which is a question mark and This colon is our ternary operator. It is said that the ternary operator works like this Question Mark B Colon C and its Basic It means that there is a condition inside A. And put a question mark above the condition We are asking for the value of this condition to be true. is true or the value of this condition is false The value of the condition containing a of the if condition becomes true, then in that case, the It will be written that it will come true but if its If the value is false, execute c. It will happen, for example, if we give some condition We are questioning him, is it true? And is it false, if it is true then the first one The thing will be executed and if it fails The second thing will be executed like Here we checked the value of edge Greater than 18 is question mark if age of value greater than 18 so we have Adult will come otherwise this colon means Otherwise, he will be declared not adult. Let's execute it once and see remove all of this let's make a variable We keep the value of the called edge for now. 25 We can check here if the edge key Value greater than equal to 18 is question Mark will come to us adult or else. Not adult will come to us saved I refreshed and nothing would print. Because we don't print anything. We're just saying a string This will be the result, otherwise this will be the result. If you want, you can convert that result into a new variable. You can also store it inside, the late result is Equal to this, this is our entire The expression is the result of this variable It will go inside and be stored and then we will If you can print the result then this We printed and saved our results. Done, refreshed, came to us Adult because our age is greater than If I am 18 then 25 is greater than 18 which makes me an adult. I will return it but if we make it 16 saves If we refreshed it then we have not Adult will come but the major thing is that this is our is a ternary operator, now if we want, we can directly We can also print it here if we Don't use the result variable and we can go straight to Write Kasol here Dialog is this way and another kasol dialogue Write the statement and save it here. Also, combine two statements in a way It can be written and refreshed by printing I came not adult but here again we did 25 Saved, refreshed, and this time printed. I have become an adult now, this thing is Completely valid, this is how we do things You can write it but generally we do not prefer this. We can use the ternary operator Prefer to use it inside the code We can, but generally if we have some small problem Condition has to be checked like if only We just have to write the strings which we Adult is non adult only if this much work If we had to do that, then we would use the ternary operator Could have used it to print generally for this we do not use it means if it The statement becomes too long. If it happens then in that case we call FLs If you prefer then ternary operator nothing is an operator that converts if else into Another way to write it is basically this Checking the condition if true If done then it will be executed else If it is done then it will be executed then this Is nothing but a simple or is it compact if Else we can say more compactness So this was all about opera tus and conditional Statements, followed by another small topic. is what I wanted to touch, which is our There are MDN docs, so if you ever I feel like I need to use JavaScript inside I want to explore more things There is a new topic which I have to study. Do I need to learn something else or do I need to know the exact You have to see the documentation that all these things What does it mean? Let me give you a little theory. I have to read because there is a lot of reading too. Important habits for a programmer So we would have documentation for that. There is online which we can call MDN documentation and we can simply go and do it So for MDA, the ADA web docs are this Developer: mozilla.org So, our If you are an organization then this free documentation The documentation is not written by the developers So our CSS inside this Script operator that takes three operators condition followed by truth value in this way from colon I also saw the example here Given that this way our ternary operator Now this function is written as Don't get confused by what it is We'll be studying functions later, but This is our approach to ternary operators. We check the condition of writing Then if the expression is true then this will be executed otherwise this value If it will be executed then in this manner any thing about these javascript or if You If you are learning then even there if you have any If you want to learn or know anything, we are MDN You can search within the documentation. and here by the way if else except Another way would be in conditional statements To check the condition which is called Switch Switch Well Real Life Day To Day We don't use it that much in programming. You don't do that much in your projects You will use it in your real life which is our day There is day to day development within it too. The switch statement is not used as much but it There is also a way to do this: switch statement To check the condition if we want to check Switch statement so we simply go and do We can look for Switch statement or simply switch search So this is our switch statement. So what does a switch statement do? It is a Value match based on a single expression For example, here it gives the output We wrote papayas inside the expression So what it will do is put that switch inside We write the expression as a switch There is a way to write a switch, we then Let's put pennies on it, I'll zoom in a little bit. Let me do this and then we will plant our penises. and there we switch like this Then we write our expression When I write, papaya came inside it and Then by applying curly braces in this manner we If you are checking then here you can see the switch Inside we write the cases that this case is true If it happens then this thing should be the second case true If it happens then this thing should be the third case true If it happens then this thing should happen, this is how we If they write a lot of conditions, then accept it. If it is papaya, is it from the case with oranges? Is it matching with the mango seller or not? Is it matching or not matching with papaya? He is matching with Papaya. We can get this thing printed by doing a kasol dolog I will give it to you and as soon as we get it printed Similarly, we will take a break from here. Doing this means you come out of the switch. Otherwise, generally the switch works like this If any condition is checked then the one below it Will match all conditions So switch a little bit interesting different ways works from but because so much Frequency If you want to read about it as homework You can go and explore the problem. Yes, you can go and read it completely with us. Our syntax for this method is what is the expression for doing You will find many things in the description This will be another example to be seen He has shown you this example. Copy and paste your JavaScript file If you can run inside and see this I am Giving to you as a homework problem than We will learn two things about the switch statement. You will learn about the second thing you will learn What is the documentation inside MDN? You have to read it in a good way, that too program because in these cases Tomorrow you may get some new feature. You want to build many things inside it. You have to learn on your own, so learn on your own. Whatever is going to happen will come only when we go. Read external documentation when We will go and explore things on our own. I will tell you something that was not covered in the lecture. Go explore on your own in your own time. So this is something you can go and read. be in MDN documentation this the link is Developer mozilla.org is the organization that Provides us with a lot of resources So this was all about operators and our Now we can solve the conditional statements. There are some practice questions First in the practice questions Let's talk about practice questions. We will do the first question, two questions. The first one you have to do with me, the second one Try to solve it yourself by pausing Have to do it and also inside the practice questions We are going to learn something new now. Practice question saying get user User means anyone who uses our website. Get user to input a number using prompt Enter a number now the prompt here is this The words we hear at this time are prompt and Alert is two things JavaScript We already saw the alert inside inside your first class, basically if I've come here inside my code If I wrote inside my code Alert alert is a message if I wrote alert so what does it do a He takes the message, now where does this suggestion come from? You will also see this suggestion for VS Code. Where are you coming from inside MDN reference If I write inside the alert Diya hello so what will he do this to me A message is displayed at the top of the website. A pop up will appear and you will see Save This Let's refresh and what came up is this I got a pop up saying this page says this page Hello, I will ok this and then it will go. So this one time one time pop up will go to our If he had created it for me then this would have worked. Now there is an alert, just like we would have an alert. Similarly, we have something called Promt Promt's job is also to give some message It happens as if I created a promotion Hello, so what will it do? It will send me some messages. If you save and refresh it, it will come here also. Another one in promotion on Gaya This Page Says Hello Additional functionality is to promote It will give the message but also some input along with it. I can take my name here. I can give it to you by inputting it so hello On this basis I wrote Shraddha and this Done, okay, now here it is true that we have done something. I did not do it, but whatever this promotion, whatever input We can store its value as a variable. You can save it inside like I did took the variable let name is equal to this variable and then what we'll do is this variable We will print the name of console.log Let's save the name, refresh it and say hello. I have written my name Shraddha ok If you do this, my name will be printed for me. I will refresh my name again. Wrote your college okay did yours for me College print has come back refreshed again I will complete my name, name it Shraddha Khap wrote it and said, okay, I did it. The full name came printed for me. Proms are a temporary way for us can take input from the user now when I gave this website my name so I Who am I? I am a user who uses this website. I am giving some information, okay done and Then this website saves that information. She can get it printed along with it. If anything can work then promises us One way is to take input from the user. So here our question tells us this It is saying that you need to take an input from the user. in the form of a In the prompt you will write enter a number And the user will enter some number and then give it to us. We need to check if this is number five. Is it a multiple or not? It is a multiple of five. When is any number a multiple of five? happens when he comes to the table of five And how will you know that any number is five? What comes in the table is like f happened like 10 became 15 became 20 became 25 These are all the numbers starting with five. It will be completely divided, meaning it will be divided by five. Divided and give us a reminder Zero is whatever is completely divisible by five He will give a reminder that Ro means he is five. It is a multiple of five and comes in the same table. The question could have been a multiple of three Identification If it happens then similarly any number Multiple of five we can check To do multiple checks, first we do one We will give you a prompt, we can write a prompt. Enter a Number: In this way we created the promotion If you save it and refresh it, This is what we are seeing written in the prompt. Enter a number or we can enter any number Let's suppose we entered 25 Now it's true that if we don't save it Let's save it inside a variable. We will call it number so this right side se This value is coming to our left side. Going to the store is happening using assignment operator now we can check if Our number is if number Modelo 5 is triple equal to 0 here we What are we checking for if condition? applied with this that if our Numbers divided by five in reminder It is giving zero, which means it is a multiple of five. In that case we have to print to console A log number is a multiple of any number. instead we print the value of the actual number The number is a multiple of f and In case of else we get it printed will give the number is not a ml of five saved I refreshed it, this time I typed in the number. Kia Five is coming printed here Five is a multiple of five here is a quadratic Let's give it and reduce one space from here. We give it because automatically when a comma comes If so, a space automatically appears. refreshed enter a number five entered Five is a multiple of five refreshed 25 is a multiple of three Three is not a multiple of five refresh did 100 okay 100 is a multiple of 5 I refreshed, let's say I typed in a random number. gave 675 45 okay 675 45 is a multiple of 5 like we checked multiple of f Multiple of th can also be checked just here I will have to write us and that is our print statement I will have to write three inside that as well and save it. Refreshed, this time check for these three If he does it, we will write it, he is writing it, isn't he? A multiple of the refreshed we will write 15 15 is a multiple of 3 17 17 is not a multiple of 3 because 17 in the table of 3 I don't know it, but the computer is so fast. Our code is so fast that we can run any random will write the number about which we probably only I don't know, for example I wrote 18 3 27 Maybe we'll just see calculate Could not decide whether it is a multiple of three or not By clicking OK, our code will do it for us. 18327 is a multiple of 3 so what did he do Kia automatically checked it for us. If you don't have to do that calculation then this method Our programs for great values Simplifying things too much for us and in this way we can get our If Else statements and these are our operators I am using these now, next we're going to practice our second question second question is saying right a Code Which Can Give Grades to Students That means we will be given the marks of the student Or scores, this is what we call our scores. Given that the student's score is 75 whether the student's score is 89 or Whatever the score is, whatever the number is, on its basis We have to give a grade to that student. We have given conditions for grade that if it comes in 80 to 100 a give me 70 from 89 comes b give 60 from 69 comes c give 50 to 59 comes d give Two more from 0 to 49, so our grade will be F. So we have to check all these conditions. Using our If Then we can do Else If And then our if block because our If you have multiple conditions then here you will find I have to pause the lecture once and talk to myself. Trying to solve this question And then we can conclude with the final answer. Now let's finally move on to solving the question. to do we know we have a The variable will be any variable named score There will be any score inside it and this Based on the score, we will decide our EFFECTS condition. If you write, start from the first condition. First condition says that from 80 The score should be between 100 and here You can check if the value of the score is We don't have to check one condition, we have to check two. If the value of the score is greater than equal to 80 is the end score key If the value less is equal to 100 then in that case In our first condition, this thing will come I have to look carefully at the same conditions divided into two parts 80 to 100 what is this this is a range Range directly inside JavaScript We cannot check the edge size within the if or What we have learned so far It is not possible to check inside at least. then how do we check the range I'll look at it, it must be greater than 80. and must be less than or equal to 100 So we will write here if the value of the score Well here I believe there is a mistake In this question 80 instead of here on our Pass should be 90, that's a little more sense If you don't make it, the condition will overlap. If it is greater than 80 then it also falls between 70 and 89 So this should be equal to 90, this is what you Correct it, it should be between 90. What will we do in that case? In this case, we put the condition 90 here. yes let's make it 90 so first we check Will our score be worth more? Then equal to 90 is the value of the score is 90 also It could be 91, it could be 92. It is possible but we should also check this along with it. I have to do that, okay, it is bigger than 90, but The score did not become 120 because the score If there is a maximum value, then it To check the value, this condition must be true. It should happen, it should happen together The condition must also be true that the score Value less than equal to 100 is also true If both are true then it means that the range We're coming in, we're coming in range So in that case our grade variable will be What will be the value of the grade variable? The value will be equal to a, so in this way from our if statement will come then we can Inside the Write Else If Else If, we can write If the score is greater than 70 and Score is Lesson Equal to 89 So this is how we get to our second condition. If you can write then I hope that we can get the format You must have understood how Else is to us Now let's come to our code This is my practice question to code Let's make a variable called score We can keep the score whatever the beginning Let's keep it 75 and take a variable Let's take a lie down Let us first check the condition of the grade that If the value of our score is greater than Equal to 90 is the value of end score Lesson equals 100, so in that case our We will set the value of grade to equal T a else if second condition p is met if Value of score greater than equal to 70 and end score's value less than equal to 89 then in that case our grade would be will go to b's Equal Else If Score's Value If Greater Then equal to we write the smaller value first There are greater than equal to First checking the condition then less than If you want, you can also do the opposite of equal to. Which condition comes first and which comes later? In comes the matter here in this case Will not make the score value greater than Equal to 60 is the value of end score lace than equal If two is 69 then the grade here will be equal to two We have C's Equals Else If score key Value if greater than equal to 50 is and The value of the end score is less equal to 59 We have So here the value of grade is equal to will go and else here we want else You can also give the case or else one last Else If can also be given Else If score is greater than equal to 0 and and because There is no negative score, the score is less than equal to 49 so in that case our grade value If f becomes equal to then all these We wrote down the conditions one by one. Well, we can write if and else if last In our case of Els, We can completely skip to the last one. I will print it tomorrow Log According to Your Scores Your Grade Vals and you can show your grades Is this my grade now if the score is 75 If we refresh it then what will be our grade? Our B grade is gone, where is 75? Condition 75 Wale Condition Is First Wale falls within the LCF, if the grade here Hota let's suppose we had 95 sco 95 ka If we refresh our score, our grade would be A Aa. This is where we come to if let's suppose 33 If our score was , our grade would have been F We would have had a score of 62. Refreshed my grade, if it had come to C then this This method of automatic grading The system is if we want the value of this score You can also take it from the promotion, Ye Can Right A prompt to enter your score and write it to be between 0 and 100 Needed Score Save Refresh First Score Enter Let's settle our score, let's suppose we Have 84 ok your grade was be refreshed If my score was let's say 98 then my grade was A so in this way we can increase our if Else conditions can be used to make Fully functional programs, these are the complete We have written the entire code, we A program we can say that we have Write your own JavaScript program It is given that there is a lot of code and combination. I have combined a little logic so this was All About Operators and Conditionals Statements I hope today's lecture which we We had a lot of new things in it. You must have learnt them and now we can implement them. You will be practicing more That's all for today, see you all. Till then keep it inside the next lecture. Learning and Keep Coding