If Statement:- In the javascript program, if you want to run the different thing with the different conditions. You can achive this by using the if statement in your program. So, that your program runs by your given conditions.Lets check the format of the if statement:-
Lets check hoe its work in the program:-