Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <script>
- function myFunction(valNum) {
- var age;
- if (x < 14) {
- age = "child.";
- break;
- } else if (x > 13 && x < 19) {
- age = "teenager.";
- break;
- } else if (x > 19) {
- age = "adult.";
- }
- document.getElementById("demo").innerHTML="You're a" + age;
- }
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement