24 lines
827 B
HTML
24 lines
827 B
HTML
<!DOCTYPE html>
|
|
<!--
|
|
Click nbfs://nbhost/SystemFileSystem/Templates/Licenses/license-default.txt to change this license
|
|
Click nbfs://nbhost/SystemFileSystem/Templates/ClientSide/html.html to edit this template
|
|
-->
|
|
<html>
|
|
<head>
|
|
<title>Challenge 3</title>
|
|
<meta charset="UTF-8">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
<script type="text/javascript">
|
|
var age = prompt("Please enter your age.");
|
|
if (age <= 5 & age <= 12) {
|
|
document.write("Congratulations! Your ticket is free!");
|
|
} else if (age <= 12) {
|
|
document.write("Your ticket costs $5.00.");
|
|
} else {
|
|
document.write("Your ticket costs $9.00.")
|
|
}
|
|
|
|
</script>
|
|
</head>
|
|
</html>
|