-
J
+
+ n
snare
-
-
K
+
+ s
tom
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/01 - JavaScript Drum Kit/style.css b/01 - JavaScript Drum Kit/style.css
index 075578c930..1ff1151058 100644
--- a/01 - JavaScript Drum Kit/style.css
+++ b/01 - JavaScript Drum Kit/style.css
@@ -15,6 +15,8 @@ body,html {
min-height: 100vh;
align-items: center;
justify-content: center;
+ flex-wrap: wrap;
+ align-content: center;
}
.key {
diff --git a/02 - JS and CSS Clock/index-START.html b/02 - JS and CSS Clock/index-START.html
index ee7eaefb1f..89268e42be 100644
--- a/02 - JS and CSS Clock/index-START.html
+++ b/02 - JS and CSS Clock/index-START.html
@@ -2,7 +2,7 @@
-
JS + CSS Clock
+
JS + oooo CSS Clock
@@ -62,12 +62,45 @@
background:black;
position: absolute;
top:50%;
+ transform: rotate(0deg);
+ transform-origin: 100%;
+ transition: all 0.5s;
+
+ transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1);
+
+ }
+
+ .second-hand {
+ height:2px;
}
+ .hour-hand {
+ height:12px;
+ }
+
+
diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html
index 8a4f0d556e..bf62fb4e28 100644
--- a/03 - CSS Variables/index-START.html
+++ b/03 - CSS Variables/index-START.html
@@ -15,13 +15,19 @@
Update CSS Variables with JS
-
+

diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html
index eec0ffc31d..bb00653b7c 100644
--- a/04 - Array Cardio Day 1/index-START.html
+++ b/04 - Array Cardio Day 1/index-START.html
@@ -29,30 +29,58 @@
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 yearsLived = i => i.passed - i.year;
+
// Array.prototype.filter()
// 1. Filter the list of inventors for those who were born in the 1500's
+ console.log( inventors.filter( i => i.year > 1500 && i.year < 1600) );
// Array.prototype.map()
// 2. Give us an array of the inventors' first and last names
+ console.log( inventors.map( i => [i.first, i.last]));
+
// Array.prototype.sort()
// 3. Sort the inventors by birthdate, oldest to youngest
+ console.log( inventors.sort( (a,b) => a.year - b.year ));
+
// Array.prototype.reduce()
// 4. How many years did all the inventors live?
+ console.log( inventors.reduce( (acc, cur) => acc + yearsLived(cur), 0));
// 5. Sort the inventors by years lived
+ console.table( inventors
+ .sort((a,b) => yearsLived(b) - yearsLived(a))
+ .map( i => [yearsLived(i), i.first, i.last].join(' '))
+ )
// 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name
// https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris
+ // im skipping this; well understood
-
+ const extractNameComponents = name => {
+ const [last, first] = name.split(',');
+ return { last, first };
+ }
// 7. sort Exercise
// Sort the people alphabetically by last name
+ console.table( people
+ .map(extractNameComponents)
+ .sort( (a, b) => a.last > b.last ? 1 : -1)
+ )
+
// 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 data = ['car', 'car', 'truck', 'truck', 'bike', 'walk', 'car', 'van', 'bike', 'walk', 'car', 'van', 'car', 'truck', 'moped' ];
+ const counts = data.reduce( (acc, cur) =>
+ // clone the accumulator so we avoid mutating the value
+ Object.assign({}, acc, {
+ [cur]: acc[cur] ? acc[cur] + 1 : 1
+ }), {});
+
+ console.log( counts );