-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Learned the rest of the basic data types and created a simple age calculator
- Loading branch information
Showing
6 changed files
with
21 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Age Calculator</title> | ||
|
||
</head> | ||
<body> | ||
|
||
<h1>Age Calculator</h1> | ||
|
||
<p>Enter your age and find out how many days you've been alive!</p> | ||
|
||
<script type="text/javascript" src="ageCalc.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
//Ask for the peron's age | ||
var age = prompt("How old are you?"); | ||
|
||
var calcDays = age * 365.25; | ||
|
||
alert(age + " years is roughly " + calcDays + " days"); |
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.