Q:

javascript if and statement


if (hour < 18) {

    greeting = "Good day";

 }
else {

    greeting = "Good evening";

 }
 
5
if (5 < 10) {
	console.log("5 is less than 10");
} else {
	console.log("5 is now bigger than 10")
}
6
let a = 1;
let b = 2;
if(a == 1 && b ==2){
	// Code here 
}
0

if (condition) {

  //  block of code to be executed if the condition is true

 }

 
5
if (A === B) && B === 1) {
  // Code here
}
0

if (hour < 18) {

    greeting = "Good day";

 } 
4
if x > y 
  alert("Hello World");

-1

New to Communities?

Join the community