if statement - satisfy condition
1
. But it will only run if the condition is met.Adjust the condition such that the code inside the curly braces will execute and the console.log()
statement logs true
.
let num = 0;
if (1 > 2) {
num = 1;
}
console.log(num === 1);
Javascript
Console