Here we are explaining the condition of js and here is if condition and else condition.
var temperature;
temperature = 50;
/* here we are using if and else
and if the condition is used for the conditions and if there is doing more than two work and
also, we explain in code also.*/
// if (temperature = 30) {
// console.log("The temperature of outside is normal");
// }
if (temperature > 40) {
console.log("The environment of the outside is very hot.")
} else {
console.log(" The environment of the outside is good yet.")
}
The output of the above code is :
The environment of the outside is very hot
No comments:
Post a Comment