In JavaScript, an if/else statement consists of a condition followed by two blocks of code. The first block is executed if the condition is true. The second block is executed if the condition is false. The general syntax looks like this: if (condition) { // statement if condition is true } else { // statement if condition is false }
Descrivi la sintassi di base di un'istruzione if/else in JavaScript.