vara=1;
varb = 2;
if(a< b) {//a<b>Run the contents
a = b;
}
It was written like this, but if(a< b) If it's {//a<b, where should I write the contents of Run
?
In this program, the a=b;
line of a<b Run Content
If statement is followed by a parenthesis {}, but if a<b is true, then the parenthesis is executed.
For example, a=b;
substituting b for a, and console.log("executed!) outputting what has been done."); If you want to run
, you can write as follows:
if (a< b) {
a = b;
console.log("executed!");
}
© 2024 OneMinuteCode. All rights reserved.