1. condtion.js
age = 12; if (age < 15){ alert("You are not old enough to see the movie."); }
age = 18; if (age < 15){ alert("You are not old enough to see the movie."); } else{ alert("Here is your ticket, enjoy the movie."); }
age = parseInt(prompt("How old are you?")); if (age < 17){ alert("Go study."); } else{ if (age < 65){ alert("Get a job."); } else { alert("Retire."); } }
age
to 15. Then check this age
to see if I am under 18, and if I am, tell me "You are not old enough to see the movie."cost
to 20.00, as follows: cost = 20.00;
. This will represent $20. Now check if the cost
is less than $30. If it is, say "Bargain", if not, say "Ripoff"sticks
from the user, using sticks = parseInt(prompt("Enter sticks: "));
. If I have at least 7 sticks in Minecraft, I can craft a wooden ladder. If I can craft a wooden ladder, say "You can craft a wooden ladder." Otherwise don't say anything.Become a manager.