Title: Javascript Practice
Type: Homework
Duration: "3:00 - 4:00"
Creator:
Original creators: WDI-BLT, WDI-Meeskeeks, WDIR-Panthalassa
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
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Supply</title> | |
<link rel="stylesheet" href="style.css"> | |
</head> | |
<body> | |
<div id="container"> | |
<div id="sidebar"> |
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
/*********************************** | |
For testing only | |
************************************/ | |
/** { | |
border: 1px solid gold; | |
}*/ | |
/*********************************** | |
General | |
************************************/ |
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
//////////////////////////////////////////////// | |
//Part One | |
/////////////////////////////////////////////// | |
var isPrime = function(num) { | |
// Prime is any number greater than 1. | |
if (num < 2) { return false }; | |
//First section, see if the number entered is evenly divisible by any number (other than 1). | |
//Second section, as per the instructions, you only need to test up to the square root of the number. | |
//third is just increasing the number that is checked each time. |
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
console.log('lotr homework solutions'); | |
////////////////////////////////////////////// | |
// Let's make the land | |
////////////////////////////////////////////// | |
var lands = ["The Shire", "Rivendell", "Mordor"]; | |
var makeMiddleEarth = function(lands) { | |
//create and append middle earth | |
var middleEarth = document.createElement("section"); |
- Navagate to www.dropbox.com
- Open the Chrome developer tools by doing the following commands on your keyboard:
Mac:
command
+option
+j
Windows:control
+shift
+j
- In the Chrome developer tool window, click on the tab that says
Elements
.