-
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.
Merge branch 'master' of https://github.com/martkyle/web-dev-bootcamp
- Loading branch information
Showing
6 changed files
with
64 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"); |
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,13 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>Script Demo</title> | ||
<script type="text/javascript" src="stalker.js"></script> | ||
</head> | ||
<body> | ||
<h1>Including JS Files</h1> | ||
|
||
|
||
|
||
</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,3 @@ | ||
var userName = prompt("What is your name?"); | ||
alert("Nice to meet you, " + userName); | ||
console.log("Also great to meet you " + userName); |
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,19 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title>JS Basics</title> | ||
<script type="text/javascript" src="stalker.js"></script> | ||
</head> | ||
<body> | ||
<h1>JS Stalker Exercise</h1> | ||
<p>Variables, Strings, Prompt, and Console.log</p> | ||
<ul> | ||
<li>Ask for the user's first name</li> | ||
<li>Ask for the user's last name</li> | ||
<li>Ask for the user's age</li> | ||
<li>Print out the user's full name in a sentence</li> | ||
<li>Print out the user's age in a sentence</li> | ||
</ul> | ||
|
||
</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,8 @@ | ||
var firstName = prompt("What is your first name?"); | ||
var lastName = prompt("What is your last name?"); | ||
var age = prompt("What is your age?"); | ||
|
||
var fullName = firstName + " " + lastName; | ||
|
||
console.log("Your full name is " + fullName); | ||
console.log("You are " + age + " years old"); |