JavaScript if and else

JavaScript if…else is a conditional statement that is used to check wether a condition is true or false to take a decision.


Other examples in Ifelse (JavaScript Language)
Result from the Online TryIt-Editor
chrome 1.0safari 1.0Firefox 1.0ie 3.0opera 4.0