console.log Use with console.log (); Display in parentheses on the console As a caveat, if you want to display the character string, enclose the character string in "" like console.log ("").
○ console.log ("aiueo") ⇨ displayed as aiueo × console.log (aiueo) ⇨ reference error occurs
When declaring a value, declare it with let or const
let numberA = 1; const numberB = 2;
There is a difference between the two, let can be updated but const cannot be updated
Variables can update their values let numberA = 1; At this point number A is 1,
numberA = 10; Now number A is 10 instead of
if (condition) {processing} ← do not add a semicolon {Processing} is executed when (condition) is satisfied
Example condition a> = b a is over a <b a is below b
Use else if to add more conditions else if (condition) {processing} ← do not add a semicolon
Use else to process when the condition is not met If all the if and else if conditions are not met, the else process is executed. else {processing}
Recommended Posts