Going out tonight?

Report a typo

Imagine you want to go to the pub this evening but look too young. The pub staff knows nothing about your age, so now you must implement the age-checking procedure.

Set the value of 18 to the variable age. Set the condition of age checking to the condition variable: is your age less than 18 or not? If so, you must write in the console, Sorry, but you are a minor. If the age is over or equal to 18, the message is That's ok. You can enter the pub.

Write a program in JavaScript





___

Create a free account to access the full topic