DEV Community

Edvaldo Neto
Edvaldo Neto

Posted on

I want help on this Javascript exercise

Write a simple JavaScript page using functions page that allows the user to enter their age and display an appropriate message. Generate different messages for teenagers (between
13 and 19), working class (20 and 64), retired (65 and above). Add a relevant message that will indicate that the user has made an invalid input.

Top comments (2)

Collapse
 
karmacode00 profile image
Andrea Lafertte

What exactly do you need help with?
You can use from a prompt to a input text to get a users age, and then a function to display different messages considering the info the user gave you.
Hint: You can use if/ if else

Collapse
 
avalander profile image
Avalander

So... what is it that you are having trouble with, exactly? It seems pretty straightforward to me.