Question: 2 . 1 Create a JavaScript program that checks if a user is eligible to vote based on their age using a tenary operator. If

2.1 Create a JavaScript program that checks if a user is eligible to vote based on their age using a tenary operator. If the user is 18 or older, display an alert message saying "You are eligible to vote." Otherwise, display a message "You are not eligible to vote" on the web page using document.write().[15 Marks]
2 . 1 Create a JavaScript program that checks if

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!