diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html
index 4070d32..bac7aeb 100644
--- a/01 - JavaScript Drum Kit/index-START.html
+++ b/01 - JavaScript Drum Kit/index-START.html
@@ -1,66 +1,77 @@
-
-
- JS Drum Kit
-
-
-
-
-
-
-
- A
- clap
-
-
- S
- hihat
-
-
- D
- kick
-
-
- F
- openhat
-
-
- G
- boom
-
-
-
H
-
ride
+
+
+
JS Drum Kit
+
+
+
+
+
+ A
+ clap
+
+
+ S
+ hihat
+
+
+ D
+ kick
+
+
+ F
+ openhat
+
+
+ G
+ boom
+
+
+ H
+ ride
+
+
+ J
+ snare
+
+
+ K
+ tom
+
+
+ L
+ tink
+
-
- J
- snare
-
-
- K
- tom
-
-
- L
- tink
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
+
--
knotmirror 0.0.1
From 47aa6abd171a972072a3013d074c5ba57e594aa0 Mon Sep 17 00:00:00 2001
From: Tyler Lawson
Date: Thu, 18 Feb 2021 21:29:18 -0500
Subject: [PATCH 02/10] 2 done
---
02 - JS and CSS Clock/index-START.html | 126 ++++++++++++++-----------
1 file changed, 71 insertions(+), 55 deletions(-)
diff --git a/02 - JS and CSS Clock/index-START.html b/02 - JS and CSS Clock/index-START.html
index 7a6d27d..a3f2787 100644
--- a/02 - JS and CSS Clock/index-START.html
+++ b/02 - JS and CSS Clock/index-START.html
@@ -1,12 +1,10 @@
-
-
- JS + CSS Clock
-
-
-
-
+
+
+ JS + CSS Clock
+
+
+
-
+
-
+ const hour = now.getHours();
+ const hourDeg = (hour / 12) * 360;
+ minHand.style.transform = `rotate(${hourDeg + 90}deg)`;
+ }
+ setInterval(setDate, 1000);
+
+
--
knotmirror 0.0.1
From 564776cc947c512d6a953b701b48bb6353971ab1 Mon Sep 17 00:00:00 2001
From: Tyler Lawson
Date: Thu, 18 Feb 2021 21:46:12 -0500
Subject: [PATCH 03/10] 3 done
---
03 - CSS Variables/index-START.html | 115 +++++++++++++++++++---------
1 file changed, 79 insertions(+), 36 deletions(-)
diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html
index 6b9b539..8a5edb9 100644
--- a/03 - CSS Variables/index-START.html
+++ b/03 - CSS Variables/index-START.html
@@ -1,51 +1,94 @@
-
-
- Scoped CSS Variables and JS
-
-
- Update CSS Variables with JS
+
+
+ Scoped CSS Variables and JS
+
+
+ Update CSS Variables with JS
-
-
+
-
- input {
- width: 100px;
- }
-
+
+ function handleUpdate() {
+ const suffix = this.dataset.sizing || "";
+ document.documentElement.style.setProperty(
+ `--${this.name}`,
+ this.value + suffix
+ );
+ }
-
+ inputs.forEach((input) => input.addEventListener("change", handleUpdate));
+ inputs.forEach((input) =>
+ input.addEventListener("mousemove", handleUpdate)
+ );
+
+
--
knotmirror 0.0.1
From 2a10aac9018e555b92d32d4d2b0f1a4dd524b8b8 Mon Sep 17 00:00:00 2001
From: Tyler Lawson
Date: Thu, 18 Feb 2021 22:18:27 -0500
Subject: [PATCH 04/10] 4 done
---
04 - Array Cardio Day 1/index-START.html | 193 +++++++++++++++++------
1 file changed, 143 insertions(+), 50 deletions(-)
diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html
index 21bec96..59be152 100644
--- a/04 - Array Cardio Day 1/index-START.html
+++ b/04 - Array Cardio Day 1/index-START.html
@@ -1,65 +1,158 @@
-
-
- Array Cardio ๐ช
-
-
- Psst: have a look at the JavaScript Console ๐
-
-
+ // 7. sort Exercise
+ // Sort the people alphabetically by last name
+
+ const sortedPeople = people.sort((a, b) => (a > b ? 1 : -1));
+ console.table(sortedPeople);
+
+ // 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 instances = data.reduce((acc, str) => {
+ if (str in acc) {
+ acc[str] += 1;
+ } else {
+ acc[str] = 1;
+ }
+ return acc;
+ }, {});
+ console.table(instances);
+
+