From 6914825b4c42c98e5c060338b22315abb99be296 Mon Sep 17 00:00:00 2001 From: Json7D Date: Sat, 23 Sep 2017 22:34:02 -0500 Subject: [PATCH 01/10] Play my first sound in javascript! --- 01 - JavaScript Drum Kit/index-START.html | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 4070d32767..fe9315e85d 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -58,9 +58,16 @@ + From 887e91c39a4dee6df3138fcf57f386840027a122 Mon Sep 17 00:00:00 2001 From: Json7D Date: Sat, 23 Sep 2017 22:43:01 -0500 Subject: [PATCH 02/10] Add first animation to keys! --- 01 - JavaScript Drum Kit/index-START.html | 7 +++++-- 01 - JavaScript Drum Kit/style.css | 2 +- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index fe9315e85d..bf96c1d26a 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -60,10 +60,13 @@ diff --git a/01 - JavaScript Drum Kit/style.css b/01 - JavaScript Drum Kit/style.css index 075578c930..b9b9f96e5f 100644 --- a/01 - JavaScript Drum Kit/style.css +++ b/01 - JavaScript Drum Kit/style.css @@ -32,7 +32,7 @@ body,html { } .playing { - transform: scale(1.1); + transform: scale(1.2); border-color: #ffc600; box-shadow: 0 0 1rem #ffc600; } From 31a59fdefd65759e5fceba3bf7eb899f9b035689 Mon Sep 17 00:00:00 2001 From: Json7D Date: Sat, 23 Sep 2017 23:04:22 -0500 Subject: [PATCH 03/10] Final of Example 1! Adding animation and working --- 01 - JavaScript Drum Kit/index-START.html | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index bf96c1d26a..048cf8870f 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -58,16 +58,27 @@ From 1bd718d3fed834baf149204ef6617244ae5b8327 Mon Sep 17 00:00:00 2001 From: Json7D Date: Sat, 23 Sep 2017 23:06:49 -0500 Subject: [PATCH 04/10] End of excise 1 --- 01 - JavaScript Drum Kit/index-START.html | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 048cf8870f..0794127139 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -59,8 +59,6 @@ From 91f02742a9d5afa305d5b6e271bb0b0ec00ca0f5 Mon Sep 17 00:00:00 2001 From: Json7D Date: Sun, 24 Sep 2017 23:32:46 -0500 Subject: [PATCH 05/10] Create clock in Javascript + CSS --- 02 - JS and CSS Clock/index-START.html | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/02 - JS and CSS Clock/index-START.html b/02 - JS and CSS Clock/index-START.html index ee7eaefb1f..57f1f8de5c 100644 --- a/02 - JS and CSS Clock/index-START.html +++ b/02 - JS and CSS Clock/index-START.html @@ -62,12 +62,34 @@ background:black; position: absolute; top:50%; + transform-origin: 100%; + transform: rotate(90deg); + transition: all 0.05s; + transition-timing-function: cubic-bezier(0.1, 2.7, 0.58, 1); } From 80049bca687676c4844b87b4f0e5343524920685 Mon Sep 17 00:00:00 2001 From: Json7D Date: Sun, 24 Sep 2017 23:33:26 -0500 Subject: [PATCH 06/10] IDK what change but I ensure to commit --- 01 - JavaScript Drum Kit/index-START.html | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/01 - JavaScript Drum Kit/index-START.html b/01 - JavaScript Drum Kit/index-START.html index 0794127139..0d5363c22d 100644 --- a/01 - JavaScript Drum Kit/index-START.html +++ b/01 - JavaScript Drum Kit/index-START.html @@ -59,7 +59,10 @@ From 49d4a408051c787d465d24ebe827b90082b3d519 Mon Sep 17 00:00:00 2001 From: Json7D Date: Mon, 25 Sep 2017 21:53:54 -0500 Subject: [PATCH 07/10] Manipulate CSS with JS --- 03 - CSS Variables/index-START.html | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/03 - CSS Variables/index-START.html b/03 - CSS Variables/index-START.html index 8a4f0d556e..86fc5d482a 100644 --- a/03 - CSS Variables/index-START.html +++ b/03 - CSS Variables/index-START.html @@ -21,6 +21,21 @@

Update CSS Variables with JS

From f3763bfbfcd592c8d958250122e68b8e41c77038 Mon Sep 17 00:00:00 2001 From: Json7D Date: Sat, 30 Sep 2017 09:15:59 -0500 Subject: [PATCH 08/10] Start with Arrays --- 04 - Array Cardio Day 1/index-START.html | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html index eec0ffc31d..d6752bf63c 100644 --- a/04 - Array Cardio Day 1/index-START.html +++ b/04 - Array Cardio Day 1/index-START.html @@ -32,14 +32,24 @@ // 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 inventors' first and last names - + const fullNames = inventors.map(inventor => `${inventor.first} ${inventor.last}`); + //console.log(fullNames); // Array.prototype.sort() // 3. Sort the inventors by birthdate, oldest to youngest - + + const ordered = inventors.sort((a,b) => a.year > b.year ? 1:-1); + //console.table(ordered); // Array.prototype.reduce() // 4. How many years did all the inventors live? + const lived = inventors.reduce((total, inventor)=> {return total + (inventor.passed - inventor.year); + }, 0); + console.log (lived); // 5. Sort the inventors by years lived From 46814469fe3750abb243adb9f3e71dffb264d638 Mon Sep 17 00:00:00 2001 From: Json7D Date: Sat, 30 Sep 2017 09:29:56 -0500 Subject: [PATCH 09/10] Order by oldest man --- 04 - Array Cardio Day 1/index-START.html | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html index d6752bf63c..45685537ce 100644 --- a/04 - Array Cardio Day 1/index-START.html +++ b/04 - Array Cardio Day 1/index-START.html @@ -53,6 +53,16 @@ // 5. Sort the inventors by years lived + const ordLived = inventors.sort(function (a,b) { + const lastGuy = a.passed - a.year; + const nextGuy = b.passed - b.year; + + return lastGuy > nextGuy ? -1 : 1; + + }); + + console.table(ordLived); + // 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name // https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris From 7d419d97a9faadcba3703c915fe1ea9ae5c4c856 Mon Sep 17 00:00:00 2001 From: Json7D Date: Sun, 1 Oct 2017 01:19:39 -0500 Subject: [PATCH 10/10] END OF CARDIO ARRAY #1 --- 04 - Array Cardio Day 1/index-START.html | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-) diff --git a/04 - Array Cardio Day 1/index-START.html b/04 - Array Cardio Day 1/index-START.html index 45685537ce..c2f5172ebc 100644 --- a/04 - Array Cardio Day 1/index-START.html +++ b/04 - Array Cardio Day 1/index-START.html @@ -66,14 +66,34 @@ // 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name // https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris + // const category = document.querySelector ('.mw-category'); + // const links = Array.from(category.querySelectorAll('a')); + // const de = links + // .map(link => link.textContent) + // .filter(streetName => streetName.includes('de')); // 7. sort Exercise // Sort the people alphabetically by last name - + const alphabetically = people.sort(function(lastOne, nextOne){ + const [aLast, aFirst] = lastOne.split(', '); + const [bLast, bFirst] = nextOne.split(', '); + return aLast > bLast ? 1 : -1; + }); + console.log(alphabetically); // 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); +