diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html
index 4070d32767..6166204248 100644
--- a/01 - JavaScript Drum Kit/index-START.html
+++ b/01 - JavaScript Drum Kit/index-START.html
@@ -59,6 +59,27 @@
diff --git a/02 - JS + CSS Clock/index-START.html b/02 - JS + CSS Clock/index-START.html
index 240705d8fe..50a68e45a1 100644
--- a/02 - JS + CSS Clock/index-START.html
+++ b/02 - JS + CSS Clock/index-START.html
@@ -2,7 +2,7 @@
- Document
+ JavaScript Clock
@@ -57,16 +57,55 @@
.hand {
width:50%;
- height:6px;
- background:black;
+ height:3.4px;
position: absolute;
top:50%;
+ transform-origin: 100%;
+ transform: rotate(90deg);
+ transition: all 0.05s;
+ transition-timing-function:cubic-bezier(0.8, 0.2, 0.85, 2.35);
+ }
+
+ .second-hand {
+ background: red;
+ }
+
+ .min-hand, .hour-hand {
+ background: black;
+ }
+
+ .hand.hour-hand {
+ width: 45%;
+ height: 5px;
+ margin-left: 14.5px;
}
diff --git a/02 - JS + CSS Clock/index.html b/02 - JS + CSS Clock/index.html
index d5c9ec9596..ec12d50d91 100644
--- a/02 - JS + CSS Clock/index.html
+++ b/02 - JS + CSS Clock/index.html
@@ -66,6 +66,7 @@
transition: all 0.05s;
transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1);
}
+ }
diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html
index 6e28e357d0..d8798422e0 100644
--- a/04 - Array Cardio Day 1/index-START.html
+++ b/04 - Array Cardio Day 1/index-START.html
@@ -23,33 +23,76 @@
const flavours = ['Chocolate Chip', 'Kulfi', 'Caramel Praline', 'Chocolate', 'Burnt Caramel', 'Pistachio', 'Rose', 'Sweet Coconut', 'Lemon Cookie', 'Toffeeness', 'Toasted Almond', 'Black Raspberry Crunch', 'Chocolate Brownies', 'Pistachio Almond', 'Strawberry', 'Lavender Honey', 'Lychee', 'Peach', 'Black Walnut', 'Birthday Cake', 'Mexican Chocolate', 'Mocha Almond Fudge', 'Raspberry'];
- const people = ['Beck, Glenn', 'Becker, Carl', 'Beckett, Samuel', 'Beddoes, Mick', 'Beecher, Henry', 'Beethoven, Ludwig', 'Begin, Menachem', 'Belloc, Hilaire', 'Bellow, Saul', 'Benchley, Robert', 'Benenson, Peter', 'Ben-Gurion, David', 'Benjamin, Walter', 'Benn, Tony', 'Bennington, Chester', 'Benson, Leana', 'Bent, Silas', 'Bentsen, Lloyd', 'Berger, Ric', 'Bergman, Ingmar', 'Berio, Luciano', 'Berle, Milton', 'Berlin, Irving', 'Berne, Eric', 'Bernhard, Sandra', 'Berra, Yogi', 'Berry, Halle', 'Berry, Wendell', 'Bethea, Erin', 'Bevan, Aneurin', 'Bevel, Ken', 'Biden, Joseph', 'Bierce, Ambrose', 'Biko, Steve', 'Billings, Josh', 'Biondo, Frank', 'Birrell, Augustine', 'Black Elk', 'Blair, Robert', 'Blair, Tony', 'Blake, William'];
+ const humans = ['Beck, Glenn', 'Becker, Carl', 'Beckett, Samuel', 'Beddoes, Mick', 'Beecher, Henry', 'Beethoven, Ludwig', 'Begin, Menachem', 'Belloc, Hilaire', 'Bellow, Saul', 'Benchley, Robert', 'Benenson, Peter', 'Ben-Gurion, David', 'Benjamin, Walter', 'Benn, Tony', 'Bennington, Chester', 'Benson, Leana', 'Bent, Silas', 'Bentsen, Lloyd', 'Berger, Ric', 'Bergman, Ingmar', 'Berio, Luciano', 'Berle, Milton', 'Berlin, Irving', 'Berne, Eric', 'Bernhard, Sandra', 'Berra, Yogi', 'Berry, Halle', 'Berry, Wendell', 'Bethea, Erin', 'Bevan, Aneurin', 'Bevel, Ken', 'Biden, Joseph', 'Bierce, Ambrose', 'Biko, Steve', 'Billings, Josh', 'Biondo, Frank', 'Birrell, Augustine', 'Black Elk', 'Blair, Robert', 'Blair, Tony', 'Blake, William'];
// Array.prototype.filter()
// 1. Filter the list of inventors for those who were born in the 1500's
+ const fifteen = inventors.filter(inventor => (inventor.year >= 1500 && inventor.year < 1600))
+
+ console.table(fifteen)
+
// Array.prototype.map()
- // 2. Give us an array of the inventory first and last names
+ // 2. Give us an array of the inventors first and last names
+
+ // const inventorNames = inventors.map(inventor => inventor.first + ' ' + inventor.last)
+
+ const inventorNames = inventors.map(inventor => ` ${inventor.first} ${inventor.last}`)
+
+ console.log(inventorNames)
+
// Array.prototype.sort()
// 3. Sort the inventors by birthdate, oldest to youngest
+ const birthdate = inventors.sort((firstInventor, secondInventor) => firstInventor.year > secondInventor.year ? 1 : -1)
+
+ console.table(birthdate)
+
// Array.prototype.reduce()
- // 4. How many years did all the inventors live?
+ // 4. How many years did all the inventors live? Basically a for loop made easy. The way that reduce() works gives you the running total plus another value. If you don't indicate that it starts at index[0] it will start at index[1]
+ const totalLife = inventors.reduce((total, inventor) => { return total + (inventor.passed - inventor.year)} , 0)
+ console.log(totalLife)
// 5. Sort the inventors by years lived
+ const oldest = inventors.sort(function(a,b) {
+ const last = a.passed - a.year
+ const next = b.passed - b.year
+ return last > next ? -1 : 1
+ })
+ console.table(oldest)
// 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name
// https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris
+ // needs to be done in the console on the site above
// 7. sort Exercise
// Sort the people alphabetically by last name
+ // you need to practice this exercise sooooooooooo much!
+
+ const peopleNames = humans.sort((lastOne, nextOne) => {
+ const [ last, first]= lastOne.split(', ')
+ const [nextLast, nextFirst] = nextOne.split(', ')
+ return last > nextLast ? 1 : -1
+ })
+
+ console.log(peopleNames)
+
// 8. Reduce Exercise
// Sum up the instances of each of these
const data = ['car', 'car', 'truck', 'truck', 'bike', 'walk', 'car', 'van', 'bike', 'walk', 'car', 'van', 'car', 'truck' ];
+ const transportation = data.reduce(function(obj, item) {
+ if (!obj[item]) {
+ obj[item] = 0
+ }
+ obj[item]++
+ return obj
+ }, {})
+
+ console.log(transportation)