Solution Review: Let's Vote
Understand how to implement a JavaScript function that evaluates voting eligibility by age. Explore input validation, strict mode usage, and conditional logic to return appropriate messages for different age values and data types.
We'll cover the following...
We'll cover the following...
Solution
Run the code below to see the output.
Explanation
First, we need to deduce some points from the sample input and output to implement this function.
The function takes age as input and returns a string depending upon the value of age.