The following is an example of a conditional statement in JavaScript:

if (x > 0) {
    console.log("x is greater than 0");
} else {
    console.log("x is not greater than 0");
}
Crea un'istruzione condizionale in JavaScript.