2.) Next display an alert box if the user is over 21 years old letting them know they are too old to enter the club.
3.) Finally, if the user is exactly 21 have an alert box saying, â??Welcome to our exclusive club, blah blah blahâ??.
4.) After the alert it should automatically take them to a new page/URL of a site I created.
So what I have thus far is as follows:
var age = parseInt(prompt("Please enter your age:", age))
if (age < 21)
alert("Sorry, you are too young to enter")
alert("Welcome, you are old enough!");
As you can see I have steps 1 and 3 only...