Write an if/else statement with the following condition:
If the variable age is greater than 18, output "Old enough", otherwise output "Too young".
var age = 25; // Add the if/else statement here
if (condition) { block of code to be executed if the condition is true } else { block of code to be executed if the condition is false }
var age = 25; if (age > 18) { console.log( "Old enough" ); } else {/*from www . j a v a 2 s . c o m*/ console.log( "Too young" ); }