A cinema is showing movie to childeren (age < 18) for free and charging adults (age >= 18) with $10 per ticket.
Write if-else statements to print the following messages according to the given age.
For adults print the following messages to the console:
Please pay $10.
Please proceed to the cinema hall.
For children print the following message to the console:
Please proceed to the cinema hall.
CODE TEMPLATE
let age = 34;
// write your if else statement here to print the required messages
// according to the value of the age variable
For your reference here is the structure of an if-else statement
if(boolean expression) {
// execute this block if the boolean expression
// evaluated to true
}
else {
// execute this block if the boolean expression
// evaluated to false
}