diff --git a/.vscode/launch.json b/.vscode/launch.json
index 8649ba4..22494b0 100644
--- a/.vscode/launch.json
+++ b/.vscode/launch.json
@@ -30,5 +30,187 @@
],
"internalConsoleOptions": "openOnSessionStart"
},
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "2. Numbers",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/02-numbers/numbers.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "3. Strings",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/03-strings/strings.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "4. Combine Strings",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/04-combine-strings/combine-strings.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "5. Coercion",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/05-coercion/coercion.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "6. Control Flow",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/06-control-flow/control-flow-test-helper.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "7. Comparisons",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/07-comparisons/comparisons.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "8. Functions",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/08-functions/functions.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "9. Arrays",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/09-arrays/arrays-sets.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "10. Loops",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/10-loops/loops.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "11. Objects",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/11-objects/objects.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "12. Loops with Objects",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/12-loops-objects/loops-objects.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "13. More Conditionals",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/13-more-conditionals/more-conditionals.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "15. Callbacks",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/15-callbacks/callbacks.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
+ {
+ "type": "node",
+ "request": "launch",
+ "name": "16. For Each",
+ "program": "${workspaceFolder}/node_modules/mocha/bin/_mocha",
+ "args": [
+ "--timeout",
+ "999999",
+ "--colors",
+ "${workspaceFolder}/test/16-for-each/for-each.spec.js"
+ ],
+ "internalConsoleOptions": "openOnSessionStart"
+ },
]
}
diff --git a/README.md b/README.md
index cbc895d..a0fcdae 100644
--- a/README.md
+++ b/README.md
@@ -36,9 +36,10 @@ Whenever you are ready to submit your work, you will need to [commit your work,
## Resources
+- Projects: [First Project: Hangman](projects/hangman/ProjectHangman.md) | [Final Project: Document Object Model](projects/final-project/FinalProject.md)
- Installation Guide: [Mac](docs/InstallationGuideMac.md) | [Windows](docs/InstallationGuideWindows.md) | [Linux](docs/InstallationGuideLinuxAndNVM.md)
- JavaScript - [MDN](https://developer.mozilla.org/en-US/) (Unofficial JavaScript Manual) | [Tutorials](https://javascript.info/)
- Command Line: [NPM Guide](https://nodesource.com/blog/an-absolute-beginners-guide-to-using-npm/) | [Unix Crash Course](https://www.vikingcodeschool.com/web-development-basics/a-command-line-crash-course) | [Unix Cheat Sheet](http://www.mathcs.emory.edu/~valerie/courses/fall10/155/resources/unix_cheatsheet.html)
- Command Line: [Unix Cheat Sheet](https://www.guru99.com/linux-commands-cheat-sheet.html) | [Unix Tutorial](http://www.ee.surrey.ac.uk/Teaching/Unix/) | [NPM Guide](https://nodesource.com/blog/an-absolute-beginners-guide-to-using-npm/)
- Git: [Git Commands for Beginners](http://rogerdudler.github.io/git-guide/) | [First Contributions Tutorial](https://github.com/firstcontributions/first-contributions)
-- Visual Studio Code: [Mac Keyboard Shortcuts](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf) | [Windows Keyboard Shortcuts](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf) | [Getting Started](https://code.visualstudio.com/docs/getstarted/introvideos)
+- Visual Studio Code: [Mac Keyboard Shortcuts](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-macos.pdf) | [Windows Keyboard Shortcuts](https://code.visualstudio.com/shortcuts/keyboard-shortcuts-windows.pdf) | [Getting Started](https://code.visualstudio.com/docs/getstarted/introvideos) | [How to use Quokka.js](https://debug.to/1441/quokka-js-extension-for-visual-studio-code)
diff --git a/docs/SubmittingAssignments.md b/docs/SubmittingAssignments.md
index f2ef49a..df20b0a 100644
--- a/docs/SubmittingAssignments.md
+++ b/docs/SubmittingAssignments.md
@@ -20,21 +20,3 @@ In your terminal (in Visual Studio Code), type:
```
git push origin main
```
-
-## Make A Pull Request
-
-You will then need to make pull request from Github. Here is how you will do that:
-
-1. Open a browser (Chrome, Edge, Safari, Firefox, etc) and go to https://github.com/
-2. If you are not signed in, signin
-3. In the top right, click on your avatar and select "Your repositories"
-
-
-
-4. Select _JSFunFall2022_
-5. Click on the "Contribute" dropdown and click on the "Open pull request" button
-
-
-
-6. Click on the "Create pull requests" button
-7. Give your pull request a title if it does not have one and click on the "Create pull requests" button
diff --git a/examples/xss/README.md b/examples/xss/README.md
new file mode 100644
index 0000000..fff9416
--- /dev/null
+++ b/examples/xss/README.md
@@ -0,0 +1,15 @@
+# Cross-Site Scripting (XSS) Vulnerability Example
+
+This is an example of code that is vulnerable to a [Cross-Site Scripting (XSS)](https://owasp.org/www-community/attacks/xss/) attack.
+
+Open _examples\xss\xss.html_ inside of Chrome, Firefox, Safari, Edge or another web browser. To replicate a XSS vulnerability, insert some HTML with an inline event. The inline event should contain some Javascript that triggers some kind of an attack. Then click on the "Submit" button below.
+
+Here is an example of code that code be used within a client-side XSS attack.
+
+```
+
+```
+
+```
+
+```
diff --git a/examples/xss/xss.html b/examples/xss/xss.html
new file mode 100644
index 0000000..e623400
--- /dev/null
+++ b/examples/xss/xss.html
@@ -0,0 +1,57 @@
+
+
+
+ My title
+
+
+
+
+
+
+
Please read the README.md
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/exercises/00-git/IntroductionGit.md b/exercises/00-git/IntroductionGit.md
index 8b1312e..446fca7 100644
--- a/exercises/00-git/IntroductionGit.md
+++ b/exercises/00-git/IntroductionGit.md
@@ -14,3 +14,4 @@
- Michele Edington
- Hal Katzman
- Michelle Waldenmaier
+- Andre Price
diff --git a/exercises/01-variables/01-variables.js b/exercises/01-variables/01-variables.js
index 3e741b4..3d8bcd2 100644
--- a/exercises/01-variables/01-variables.js
+++ b/exercises/01-variables/01-variables.js
@@ -4,3 +4,4 @@
*/
// WRITE YOUR ANSWER BELOW THIS LINE
+let myNumber = 9;
diff --git a/exercises/01-variables/02-variables.js b/exercises/01-variables/02-variables.js
index 4b4b262..b9b1a56 100644
--- a/exercises/01-variables/02-variables.js
+++ b/exercises/01-variables/02-variables.js
@@ -4,3 +4,4 @@
*/
// WRITE YOUR ANSWER BELOW THIS LINE
+let year = 2022;
diff --git a/exercises/01-variables/03-change-a-variable.js b/exercises/01-variables/03-change-a-variable.js
index 0e3b65d..e862389 100644
--- a/exercises/01-variables/03-change-a-variable.js
+++ b/exercises/01-variables/03-change-a-variable.js
@@ -6,3 +6,4 @@ let price = 5.99;
*/
// WRITE YOUR ANSWER BELOW THIS LINE
+price = 10.0;
diff --git a/exercises/01-variables/04-constants.js b/exercises/01-variables/04-constants.js
index 649e49b..73450da 100644
--- a/exercises/01-variables/04-constants.js
+++ b/exercises/01-variables/04-constants.js
@@ -5,3 +5,4 @@
*/
// WRITE YOUR ANSWER BELOW THIS LINE
+const PIE = 3.14;
diff --git a/exercises/01-variables/05-fix-error.js b/exercises/01-variables/05-fix-error.js
index f051c9e..69941e8 100644
--- a/exercises/01-variables/05-fix-error.js
+++ b/exercises/01-variables/05-fix-error.js
@@ -5,7 +5,7 @@
// WRITE YOUR ANSWER BELOW THIS LINE
// This is throwing an error. Do you know why?
-const numberOfLikes = 57; // Change me
+const numberOfLikes = 58; // Change me
// DO NOT CHANGE THE CODE BELOW
diff --git a/exercises/01-variables/06-fix-bug.html b/exercises/01-variables/06-fix-bug.html
index bb31834..3f43a17 100644
--- a/exercises/01-variables/06-fix-bug.html
+++ b/exercises/01-variables/06-fix-bug.html
@@ -39,7 +39,7 @@
document.querySelector("#form").addEventListener("submit", (e) => {
e.preventDefault();
- document.querySelector("#name").value; // Change this line only. Set me to a variable called "content".
+ let content = document.querySelector("#name").value; // Change this line only. Set me to a variable called "content".
// Do not change this
alert("Hello " + content);
diff --git a/exercises/02-numbers/01-add.js b/exercises/02-numbers/01-add.js
new file mode 100644
index 0000000..461346d
--- /dev/null
+++ b/exercises/02-numbers/01-add.js
@@ -0,0 +1,7 @@
+/**
+ * Create a constant called "sum".
+ * On the right side of the "equals" sign, there should two numbers and a plus sign.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+const sum = 10 + 6;
diff --git a/exercises/02-numbers/02-subtract.js b/exercises/02-numbers/02-subtract.js
new file mode 100644
index 0000000..c7cfcd0
--- /dev/null
+++ b/exercises/02-numbers/02-subtract.js
@@ -0,0 +1,10 @@
+let a = 10; // e.g.
+let b = 5; // e.g.
+
+/**
+ * Create a new variable called "difference". It should equal the "b" minus "a".
+ * This should still work when "a" and "b" are equal to different numbers.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+let difference = b - a;
diff --git a/exercises/02-numbers/03-multiply-and-divide.js b/exercises/02-numbers/03-multiply-and-divide.js
new file mode 100644
index 0000000..9b45bde
--- /dev/null
+++ b/exercises/02-numbers/03-multiply-and-divide.js
@@ -0,0 +1,9 @@
+const ONE_HUNDRED = 100;
+
+/**
+ * Create a constant called "percentage".
+ * It should equal one number divided by another, and then multiplied by "ONE_HUNDRED".
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+const percentage = (60 - 40) / ONE_HUNDRED;
diff --git a/exercises/02-numbers/04-increment.js b/exercises/02-numbers/04-increment.js
new file mode 100644
index 0000000..7064fe5
--- /dev/null
+++ b/exercises/02-numbers/04-increment.js
@@ -0,0 +1,10 @@
+let age = 90; // e.g.
+
+/**
+ * Increment the variable "age" by 1. (That is, add 1).
+ * Use the increment operator to solve this problem.
+ * This should still work when "age" is a different number.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+age++;
diff --git a/exercises/02-numbers/05-decrement.js b/exercises/02-numbers/05-decrement.js
new file mode 100644
index 0000000..9d1ea9f
--- /dev/null
+++ b/exercises/02-numbers/05-decrement.js
@@ -0,0 +1,10 @@
+let age = 90; // e.g.
+
+/**
+ * Decrement the variable "age" by 1. (That is, subtract 1).
+ * Use the decrement operator to solve this problem.
+ * This should still work when "age" is a different number.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+age--;
diff --git a/exercises/02-numbers/06-order-of-operations.js b/exercises/02-numbers/06-order-of-operations.js
new file mode 100644
index 0000000..32f398c
--- /dev/null
+++ b/exercises/02-numbers/06-order-of-operations.js
@@ -0,0 +1,8 @@
+/**
+ * Without changing the numbers themselves,
+ * change the syntax or order of operations so that result equals 800.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+const result = (3 + 5) * 100;
diff --git a/exercises/02-numbers/07-calcuator.html b/exercises/02-numbers/07-calcuator.html
new file mode 100644
index 0000000..191d3eb
--- /dev/null
+++ b/exercises/02-numbers/07-calcuator.html
@@ -0,0 +1,59 @@
+
+
+
+
+
+
+
+ EXERCISE
+
+
+
+
+
+
+
+
diff --git a/exercises/03-strings/01-create-a-string.js b/exercises/03-strings/01-create-a-string.js
new file mode 100644
index 0000000..f99aaf3
--- /dev/null
+++ b/exercises/03-strings/01-create-a-string.js
@@ -0,0 +1,7 @@
+/**
+ * Create a new variable called "myName". It should be equal to your name, which is a string.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+let myName = "Hal";
diff --git a/exercises/03-strings/02-get-the-character-position.js b/exercises/03-strings/02-get-the-character-position.js
new file mode 100644
index 0000000..936e5de
--- /dev/null
+++ b/exercises/03-strings/02-get-the-character-position.js
@@ -0,0 +1,23 @@
+let firstName = "Bill"; // e.g.
+let letter = "i"; // e.g.
+
+/**
+ * Create a variable called "characterPosition".
+ * It should be equal to the first index (position) of "letter" within the string "firstName".
+ *
+ * @example
+ * let firstName = "Bill";
+ * let letter = "i"; // e.g.
+ * The answer should be 1. (JavaScript starts counting with 0).
+ *
+ * @example
+ * let firstName = "Briana";
+ * let letter = "a"; // e.g.
+ * The answer should be 3. (JavaScript starts counting with 0).
+ *
+ * Your answer should still work when "firstName" and "letter" are equal to different values than they are above.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+let characterPosition = 1;
diff --git a/exercises/03-strings/03-string-length.js b/exercises/03-strings/03-string-length.js
new file mode 100644
index 0000000..4b201ae
--- /dev/null
+++ b/exercises/03-strings/03-string-length.js
@@ -0,0 +1,13 @@
+const str = "bananas"; // e.g.
+
+/**
+ * Create a new constant called "strLength". It should be evaluate to the number of characters within the value of "str".
+ * @example
+ * - If "str" is "bananas", "strLength" should count the number of characters and result in 7.
+ * - If "str" is "chocolate", "strLength" should count the number of characters and result in 9.
+ * This should still work when "str" is equal to a different value.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+let strLength = str.length;
diff --git a/exercises/03-strings/04-get-last-character.js b/exercises/03-strings/04-get-last-character.js
new file mode 100644
index 0000000..89b862f
--- /dev/null
+++ b/exercises/03-strings/04-get-last-character.js
@@ -0,0 +1,13 @@
+let str = "Wes Craven"; // e.g.
+
+/***
+ * Create a constant called "lastCharacter". It should be equal to the last character within "str".
+ * @example
+ * let str = "Wes Craven";
+ * "lastCharacter" should equal "n"
+ * Your answer should still work when "str" is equal to something else.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+const lastCharacter = str[str.length - 1];
diff --git a/exercises/03-strings/05-get-last-word-in-place-name.js b/exercises/03-strings/05-get-last-word-in-place-name.js
new file mode 100644
index 0000000..81aa39b
--- /dev/null
+++ b/exercises/03-strings/05-get-last-word-in-place-name.js
@@ -0,0 +1,21 @@
+const place = "New Jersey"; // e.g.
+
+/**
+ * Create a variable called "newPlace". It should use "place" above and it should be equal to the last part of a place name.
+ * This should still work when place is equal to a different city, like "New Mexico" or "San Diego".
+ *
+ * @example
+ * If "place" is equal to "New Jersey",
+ * "newPlace" should equal "York"
+ *
+ * If "place" is equal to "New Mexico",
+ * "newPlace" should equal "Mexico"
+ *
+ * If "place" is equal to "San Diego",
+ * "newPlace" should equal "Diego"
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+let index = place.indexOf(" ");
+let newPlace = place.substring(index + 1);
diff --git a/exercises/04-combine-strings/01-concatenate-operator.js b/exercises/04-combine-strings/01-concatenate-operator.js
new file mode 100644
index 0000000..beb9dcc
--- /dev/null
+++ b/exercises/04-combine-strings/01-concatenate-operator.js
@@ -0,0 +1,20 @@
+let bookTitle = "Harry Potter and the Sorcerer's Stone";
+let author = "J. K. Rowling";
+
+/**
+ * Use the concatenation operator (the plus sign) to solve this problem.
+ *
+ * Create a variable called "bookInfo". It should combine the variables "bookTitle" and "author" together
+ * so that if I were to log "bookInfo", it would say:
+ * Harry Potter and the Sorcerer's Stone by J. K. Rowling
+ *
+ * @example
+ * // Declare "bookTitle"
+ * console.log(bookTitle); // Harry Potter and the Sorcerer's Stone by J. K. Rowling
+ *
+ * This should still work when "bookTitle" and "author" are different values.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+let bookInfo = bookTitle + " " + "by" + " " + author;
+console.log(bookInfo);
diff --git a/exercises/04-combine-strings/02-template-literals.js b/exercises/04-combine-strings/02-template-literals.js
new file mode 100644
index 0000000..7ad5f38
--- /dev/null
+++ b/exercises/04-combine-strings/02-template-literals.js
@@ -0,0 +1,20 @@
+let bookTitle = "Harry Potter and the Sorcerer's Stone";
+let author = "J. K. Rowling";
+
+/**
+ * This exercise is the same as the previous, except you will use template literals to solve this problem.
+ *
+ * Create a variable called "bookInfo". It should combine the variables "bookTitle" and "author" together
+ * so that if I were to log "bookInfo", it would say:
+ * Harry Potter and the Sorcerer's Stone by J. K. Rowling
+ *
+ * @example
+ * // Declare "bookTitle"
+ * console.log(bookTitle); // Harry Potter and the Sorcerer's Stone by J. K. Rowling
+ *
+ * This should still work when "bookTitle" and "author" are different values.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+let bookInfo = `${bookTitle} by ${author}`;
+console.log(bookInfo);
diff --git a/exercises/04-combine-strings/03-replace-last-name.js b/exercises/04-combine-strings/03-replace-last-name.js
new file mode 100644
index 0000000..2d39528
--- /dev/null
+++ b/exercises/04-combine-strings/03-replace-last-name.js
@@ -0,0 +1,39 @@
+let fullName = "Joe Washington"; // e.g.
+let newLastName = "Fernandez"; // e.g.
+
+/**
+ * A person just got married and they need their last name replaced. You will change the value of "fullName" below. Replace the last name in "fullName" with "newLastName".
+ *
+ * @example
+ * let fullName = "Emily Rose";
+ * let newLastName = "Smith";
+ * The new value for "fullName" should result in "Emily Smith".
+ *
+ * @example
+ * let fullName = "Joe Washington";
+ * let newLastName = "Fernandez";
+ * The new value for "fullName" should result in "Joe Fernandez".
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+//My original solution (works, but doesn't use the augmented assignment operator which it should)
+
+/*let index = fullName.indexOf(" ");
+let firstName = fullName.substring(0, index);
+fullName = firstName + " " + newLastName;
+console.log(fullName);*/
+
+//per Matina in chat - solution prints JoeFernandez (no space)
+
+//let index = fullName.indexOf(" ");
+//fullName = fullName.substring(0, index);
+//fullName += newLastName;
+//console.log(fullName);
+
+// My revised solution based on above
+
+let index = fullName.indexOf(" ");
+fullName = fullName.substring(0, index);
+fullName += " " + newLastName; //This is same as above but adds a space
+console.log(fullName);
diff --git a/exercises/04-combine-strings/04-combine-text.html b/exercises/04-combine-strings/04-combine-text.html
new file mode 100644
index 0000000..6e4c31e
--- /dev/null
+++ b/exercises/04-combine-strings/04-combine-text.html
@@ -0,0 +1,56 @@
+
+
+
+
+
+
+
+ EXERCISE
+
+
+
+
+
+
+
diff --git a/exercises/05-coercion/01-convert-string-to-int.js b/exercises/05-coercion/01-convert-string-to-int.js
new file mode 100644
index 0000000..f24ce47
--- /dev/null
+++ b/exercises/05-coercion/01-convert-string-to-int.js
@@ -0,0 +1,10 @@
+let answer = "55"; // e.g.
+
+/**
+ * You will change the value of "answer" below. Cast (convert) "answer", which is a string, so that it is an integer.
+ * This should still work when "answer" is a different numeric value (e.g. "105", "-5", "1.23")
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+answer = parseInt(answer);
+console.log(answer);
diff --git a/exercises/05-coercion/02-fix-coercion-error.js b/exercises/05-coercion/02-fix-coercion-error.js
new file mode 100644
index 0000000..59d5875
--- /dev/null
+++ b/exercises/05-coercion/02-fix-coercion-error.js
@@ -0,0 +1,14 @@
+let num1 = 2; // e.g.
+let num2 = "7"; // e.g.
+
+/**
+ * If I were to log the code below, it does not print out what I would expect.
+ * For example, I expect "sum" to result in the number 7 instead of the string "27".
+ * This should still work when "num1" and "num2" are equal to different values that could be strings or numbers.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+//let sum = num1 + num2;
+let sum = num1 + parseInt(num2);
+console.log(sum);
diff --git a/exercises/05-coercion/03-fix-coercion-input.html b/exercises/05-coercion/03-fix-coercion-input.html
new file mode 100644
index 0000000..13d930d
--- /dev/null
+++ b/exercises/05-coercion/03-fix-coercion-input.html
@@ -0,0 +1,60 @@
+
+
+
+
+
+
+
+ EXERCISE
+
+
+
+
+
+
+
+
diff --git a/exercises/06-control-flow/01-if-statement.js b/exercises/06-control-flow/01-if-statement.js
new file mode 100644
index 0000000..736b0d6
--- /dev/null
+++ b/exercises/06-control-flow/01-if-statement.js
@@ -0,0 +1,22 @@
+const burger = 7.0; // e.g.
+const drink = 1.99; // e.g.
+
+let total = burger;
+
+let isBuyingDrink = true; // e.g.
+
+/**
+ * At the "Happy Burger", you have two choices:
+ * - A burger ($7.00)
+ * - A burger ($7.00) and a drink ($1.99)
+ *
+ * If "isBuyingDrink" is true, add the cost of "drink" to the "total".
+ * If "isBuyingDrink" is false, do not change the cost.
+ *
+ * This should still work when "burger" and "drink" are equal to different numbers.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+if (isBuyingDrink) {
+ total += drink;
+}
diff --git a/exercises/06-control-flow/02-if-statement.js b/exercises/06-control-flow/02-if-statement.js
new file mode 100644
index 0000000..38cc641
--- /dev/null
+++ b/exercises/06-control-flow/02-if-statement.js
@@ -0,0 +1,21 @@
+let subtotal = 50.0; // e.g.
+let tip = 0.2; // e.g.
+
+let total;
+
+/**
+ * If a customer leaves a tip, change the variable "total"
+ * so that it is equal to the subtotal plus the subtotal times the tip.
+ *
+ * If a customer does not leave a tip (that is, "tip" equals 0), "total" should equal the "subtotal".
+ *
+ * This should still work when "subtotal" and "total" are equal to different numbers.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+if (tip) {
+ total = subtotal + subtotal * tip;
+} else total = subtotal;
+
+console.log(total);
diff --git a/exercises/06-control-flow/03-if-statement.html b/exercises/06-control-flow/03-if-statement.html
new file mode 100644
index 0000000..a6a83b7
--- /dev/null
+++ b/exercises/06-control-flow/03-if-statement.html
@@ -0,0 +1,90 @@
+
+
+
+
+
+
+
+ EXERCISE
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/exercises/07-comparisons/01-is-equal.js b/exercises/07-comparisons/01-is-equal.js
new file mode 100644
index 0000000..8f870f5
--- /dev/null
+++ b/exercises/07-comparisons/01-is-equal.js
@@ -0,0 +1,17 @@
+let isEqual;
+
+let userInput1 = 39; // e,g,
+let userInput2 = "39"; // e,g,
+
+/**
+ * You will be changing the value of "isEqual" below.
+ * If "userInput1" strictly equals "userInput2", "isEqual" should be true.
+ * Otherwise, it should be false.
+ * Hint: What does strictly mean?
+ * Your answer should still work when "userInput1" and "userInput2" are different values.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+if (userInput1 === userInput2) {
+ isEqual = true;
+} else isEqual = false;
diff --git a/exercises/07-comparisons/02-is-not-equal.js b/exercises/07-comparisons/02-is-not-equal.js
new file mode 100644
index 0000000..12fcb4b
--- /dev/null
+++ b/exercises/07-comparisons/02-is-not-equal.js
@@ -0,0 +1,18 @@
+let isNotAtGoalWeight;
+
+let targetBMI = 24; // e.g.
+let actualBMI = 27; // e.g.
+
+/**
+ * You will be changing the value of "isNotAtGoalWeight" below.
+ * If "targetBMI" equals "actualBMI", then "isNotAtGoalWeight" should be false.
+ * If "targetBMI" does not equal "actualBMI", "isNotAtGoalWeight" should be true.
+ * Your answer should still work when "targetBMI" and "actualBMI" are different values.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+if (targetBMI === actualBMI) {
+ isNotAtGoalWeight = false;
+} else {
+ isNotAtGoalWeight = true;
+}
diff --git a/exercises/07-comparisons/03-is-larger-number.js b/exercises/07-comparisons/03-is-larger-number.js
new file mode 100644
index 0000000..d0fd502
--- /dev/null
+++ b/exercises/07-comparisons/03-is-larger-number.js
@@ -0,0 +1,21 @@
+let num1 = 15; // e.g.
+let num2 = 20; // e.g.
+
+/**
+ * Create a variable called "isLargerNumber". (Do not use var.)
+ * If "num2" is larger than "num1", than "isLargerNumber" should be true.
+ * If "num1" is larger than "num2", than "isLargerNumber" should be false.
+ * If "num1" and "num2" are equal, than "isLargerNumber" should be false.
+ * Your answer should still work when "num1" and "num2" are different values.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+let isLargerNumber;
+if (num2 > num1) {
+ isLargerNumber = true;
+} else if (num1 > num2) {
+ isLargerNumber = false;
+} else if (num1 === num2) {
+ isLargerNumber = false;
+}
+console.log(isLargerNumber);
diff --git a/exercises/07-comparisons/04-is-teenager.js b/exercises/07-comparisons/04-is-teenager.js
new file mode 100644
index 0000000..d0c6e2e
--- /dev/null
+++ b/exercises/07-comparisons/04-is-teenager.js
@@ -0,0 +1,16 @@
+let age = 14; // e.g.
+
+/**
+ * Create a variable called "isTeenager". (Do not use var.)
+ * If "age" is greater than 12, but less than 20, "isTeenager" should be true.
+ * Otherwise, "isTeenager" should be false.
+ * You must use either the logical and (&&) or the logical or (||) to solve this problem.
+ * Your answer should still work when "age" is a different value.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+let isTeenager;
+if (age > 12 && age < 20) {
+ isTeenager = true;
+} else isTeenager = false;
+console.log(isTeenager);
diff --git a/exercises/07-comparisons/05-is-weekend.js b/exercises/07-comparisons/05-is-weekend.js
new file mode 100644
index 0000000..c6c85a4
--- /dev/null
+++ b/exercises/07-comparisons/05-is-weekend.js
@@ -0,0 +1,18 @@
+let day = "Saturday";
+
+/**
+ * Create a variable called "isWeekend". (Do not use var.)
+ * If "day" is Saturday or Sunday, "isWeekend" should be true.
+ * Otherwise "isWeekend" should be false.
+ * You must use either the logical and (&&) or the logical or (||) to solve this problem.
+ * Your answer should still work when "day" is a different value.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+let isWeekend;
+if (day === "Saturday" || day === "Sunday") {
+ isWeekend = true;
+} else {
+ isWeekend = false;
+}
+console.log(isWeekend);
diff --git a/exercises/07-comparisons/06-is-even.js b/exercises/07-comparisons/06-is-even.js
new file mode 100644
index 0000000..d268b06
--- /dev/null
+++ b/exercises/07-comparisons/06-is-even.js
@@ -0,0 +1,18 @@
+let num = 8; // e.g.
+
+/**
+ * Create a variable called "isEven". (Do not use var.)
+ * If "num" is even, "isEven" should be true.
+ * Otherwise, "isEven" should be false.
+ * Your answer should still work when "num" is a different value.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+let isEven;
+let test = num % 2;
+if (test === 0) {
+ isEven = true;
+} else {
+ isEven = false;
+}
+console.log(isEven);
diff --git a/exercises/08-functions/01-invoke-function.js b/exercises/08-functions/01-invoke-function.js
new file mode 100644
index 0000000..6994330
--- /dev/null
+++ b/exercises/08-functions/01-invoke-function.js
@@ -0,0 +1,19 @@
+/**
+ * @param {number} subtotal
+ * @param {number} tax
+ * @returns {number} the total cost, including the tax
+ */
+const calculateTotal = (subtotal, tax) => {
+ return subtotal * tax + subtotal;
+};
+
+/**
+ * You are paying your bill. You have a subtotal of $50.00 and tax is 20%.
+ *
+ * Create a variable called "total". The variable "total" should be equal to the result of "calculateTotal" (which is 60).
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+let total = calculateTotal(50, 0.2);
+console.log(total);
diff --git a/exercises/08-functions/02-print-greeting.js b/exercises/08-functions/02-print-greeting.js
new file mode 100644
index 0000000..1f2058e
--- /dev/null
+++ b/exercises/08-functions/02-print-greeting.js
@@ -0,0 +1,18 @@
+/**
+ * Create a function named called "printGreeting".
+ * It should accept a "name" as a parameter
+ * and print "Hello ______!" with console.log
+ *
+ * @param {string} name
+ *
+ * @example printGreeting("Tim"); // Hello Tim!
+ * You should use arrow syntax.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+const printGreeting = (name) => {
+ console.log(`Hello ${name}!`);
+};
+
+printGreeting("Matina");
diff --git a/exercises/08-functions/03-return-greeting.js b/exercises/08-functions/03-return-greeting.js
new file mode 100644
index 0000000..bae4813
--- /dev/null
+++ b/exercises/08-functions/03-return-greeting.js
@@ -0,0 +1,22 @@
+/**
+ * Create a function named called "returnGreeting".
+ * It should accept a "name" as a parameter
+ * and return "Hello ______!"
+ * (This is similar to the last exercise,
+ * except you are returning a value instead of using console.log)
+ *
+ * @param {string} name
+ * @returns {string} "Hello name"
+ *
+ * @example returnGreeting("Tim"); // Hello Tim!
+ * You should use arrow syntax.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+const returnGreeting = (name) => {
+ return `Hello ${name}!`;
+};
+
+let result = returnGreeting("Jamal");
+console.log(result);
diff --git a/exercises/08-functions/04-multiply.js b/exercises/08-functions/04-multiply.js
new file mode 100644
index 0000000..db74305
--- /dev/null
+++ b/exercises/08-functions/04-multiply.js
@@ -0,0 +1,22 @@
+/**
+ * Create a function named "multiply".
+ * It should have two parameters: "num1" and "num2".
+ * Both parameters should be numbers.
+ * The function should return the product of both numbers.
+ * (In other words, multiply!)
+ *
+ * @param {number} num1
+ * @param {number} num2
+ * @returns {number} num1 x num2
+ *
+ * @example timesFive(5); // 25
+ * @example timesFive(2); // 10
+ * @example timesFive(0); // 0
+ * You should use arrow syntax.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+const multiply = (num1, num2) => {
+ return num1 * num2;
+};
+console.log(multiply(7, 2));
diff --git a/exercises/08-functions/05-lower-case-string.js b/exercises/08-functions/05-lower-case-string.js
new file mode 100644
index 0000000..c9e086e
--- /dev/null
+++ b/exercises/08-functions/05-lower-case-string.js
@@ -0,0 +1,29 @@
+/**
+ * Create a function called "lowerCaseString".
+ * If given a string, it should return the string lower cased.
+ * @example lowerCaseString("HELLO WORLD"); // hello world
+ *
+ * If given a value that is not a string, this function should not throw an error.
+ * @see https://stackoverflow.com/questions/4059147/check-if-a-variable-is-a-string-in-javascript
+ * HINT: you will need to exit out of the function early.
+ *
+ * @param {string} str
+ * @returns {string} str capitalized
+ *
+ * @example lowerCaseString(); // undefined (should not throw an error)
+ * @example lowerCaseString(null); // undefined (should not throw an error)
+ * You should use arrow syntax.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+const lowerCaseString = (isString) => {
+ if (typeof isString === "string") {
+ return isString.toLowerCase();
+ }
+ return isString;
+};
+console.log(lowerCaseString("Javascript!"));
+console.log(lowerCaseString("HELP"));
+console.log(lowerCaseString());
+console.log(lowerCaseString(1024));
+console.log(lowerCaseString("500BB"));
diff --git a/exercises/08-functions/06-is-even-or-odd.js b/exercises/08-functions/06-is-even-or-odd.js
new file mode 100644
index 0000000..b00bd78
--- /dev/null
+++ b/exercises/08-functions/06-is-even-or-odd.js
@@ -0,0 +1,22 @@
+/**
+ * Create a function called "isEvenOrOdd".
+ * If given an even number, it should return "even".
+ * If given an odd number, it should return "odd".
+ *
+ * @param {number} num
+ * @returns {string} either "even" or "odd"
+ *
+ * @example isEvenOrOdd(10); // even
+ * @example isEvenOrOdd(3); // odd
+ * You should use arrow syntax.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+const isEvenOrOdd = (number) => {
+ if (number % 2 === 0) {
+ return "even";
+ }
+ return "odd";
+};
+console.log(isEvenOrOdd(5));
+console.log(isEvenOrOdd(100));
diff --git a/exercises/08-functions/07-count-number-of-digits.js b/exercises/08-functions/07-count-number-of-digits.js
new file mode 100644
index 0000000..e96aa87
--- /dev/null
+++ b/exercises/08-functions/07-count-number-of-digits.js
@@ -0,0 +1,19 @@
+/**
+ * Create a function called "countNumberOfDigits".
+ * Given an integer, it should return the number of digits in an integer.
+ *
+ * @param {int} num
+ * @returns {int} the number of digits
+ *
+ * @example countNumberOfDigits(5000); // 4
+ * You should use arrow syntax.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+const countNumberOfDigits = (int) => {
+ return int.toString().length;
+};
+
+console.log(countNumberOfDigits(12401));
+console.log(countNumberOfDigits(-999999999));
diff --git a/exercises/09-arrays/01-create-an-array.js b/exercises/09-arrays/01-create-an-array.js
new file mode 100644
index 0000000..6813fb4
--- /dev/null
+++ b/exercises/09-arrays/01-create-an-array.js
@@ -0,0 +1,9 @@
+/**
+ * Create an array called "restaurants". (Do not use var.)
+ * It should contain a list of at least three items
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+const restaurants = ["Stadium Diner", "Peter Luger", "Juniors"];
+
+console.log(restaurants);
diff --git a/exercises/09-arrays/02-accessing-item-in-array.js b/exercises/09-arrays/02-accessing-item-in-array.js
new file mode 100644
index 0000000..1fd7cb2
--- /dev/null
+++ b/exercises/09-arrays/02-accessing-item-in-array.js
@@ -0,0 +1,13 @@
+const cars = ["BMW", "Honda", "Civic"]; // Do not change this line
+
+/**
+ * Create a variable called "myCar".
+ * It should be equal to the first item in the array of cars.
+ * Solve this problem without using destructuring.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+const myCar = cars[0];
+
+console.log(myCar);
diff --git a/exercises/09-arrays/03-destructuring.js b/exercises/09-arrays/03-destructuring.js
new file mode 100644
index 0000000..8873af4
--- /dev/null
+++ b/exercises/09-arrays/03-destructuring.js
@@ -0,0 +1,14 @@
+const cars = ["BMW", "Honda", "Civic"]; // Do not change this line
+
+/**
+ * This problem is a repeat of the last problem,
+ * except you will solve this problem with destructuring.
+ *
+ * Create a variable called "myCar".
+ * It should be equal to the first item in the array of cars.
+ * Solve this problem without using destructuring.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+let [myCar] = cars;
+console.log(myCar);
diff --git a/exercises/09-arrays/04-position-in-array.js b/exercises/09-arrays/04-position-in-array.js
new file mode 100644
index 0000000..0c6f0c9
--- /dev/null
+++ b/exercises/09-arrays/04-position-in-array.js
@@ -0,0 +1,24 @@
+let results = [
+ // e.g.
+ "Aaminata Kamau",
+ "Claire O'Hannigan",
+ "Jian Hou",
+ "María Rosales",
+ "Fathima Kaur",
+];
+
+/**
+ * The array "results" lists runners in the order
+ * in which they placed within a race.
+ * So, for example, Jian Hou placed 3rd in the example above.
+ *
+ * Create a variable called "place".
+ * It should be equal to whatever place Jian Hou is in.
+ *
+ * Your answer should still work when the names are in a different order.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+let place = results.indexOf("Jian Hou") + 1;
+
+console.log(place);
diff --git a/exercises/09-arrays/05-add-item-to-array.js b/exercises/09-arrays/05-add-item-to-array.js
new file mode 100644
index 0000000..41d6a7a
--- /dev/null
+++ b/exercises/09-arrays/05-add-item-to-array.js
@@ -0,0 +1,9 @@
+let languages = ["C++"]; // Do not change this line
+
+/**
+ * Add three more computer languages to the languages array.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+languages.push("Java", "GoLang", "Python");
+console.log(languages);
diff --git a/exercises/09-arrays/06-combine-arrays-.js b/exercises/09-arrays/06-combine-arrays-.js
new file mode 100644
index 0000000..e41ba4a
--- /dev/null
+++ b/exercises/09-arrays/06-combine-arrays-.js
@@ -0,0 +1,12 @@
+let array1 = ["wolf", "fox"];
+let array2 = ["lion", "leopard", "saber tooth tiger"];
+
+/**
+ * Create an array called "newArray".
+ * It should be equal to "array1" and "array2" combined.
+ * Combine the arrays by using the spread operator.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+let newArray = [...array1, ...array2];
+console.log(newArray);
diff --git a/exercises/10-loops/00-solving-problems-with-functions.js b/exercises/10-loops/00-solving-problems-with-functions.js
new file mode 100755
index 0000000..699476c
--- /dev/null
+++ b/exercises/10-loops/00-solving-problems-with-functions.js
@@ -0,0 +1,16 @@
+/**
+ * Return the function's argument. (This problem is to get you used to the new format.)
+ * @param {string} personName
+ * @returns {string} personName
+ *
+ * @example returnAnswer("Lesley"); // Lesley
+ */
+
+const returnAnswer = (personName) => {
+ // WRITE YOUR ANSWER HERE
+ return personName;
+};
+
+// IGNORE THIS BELOW. It is for the tests.
+
+export default returnAnswer;
diff --git a/exercises/10-loops/01-array-length.js b/exercises/10-loops/01-array-length.js
new file mode 100755
index 0000000..bece634
--- /dev/null
+++ b/exercises/10-loops/01-array-length.js
@@ -0,0 +1,16 @@
+/**
+ * Return the length of an array
+ * @param {array} array
+ * @returns {number} the length of an array
+ *
+ * @example arrayLength([1, 9, 3, 201]); // 4
+ */
+
+const arrayLength = (array) => {
+ // WRITE YOUR ANSWER HERE
+ return array.length;
+};
+
+// IGNORE THIS BELOW. It is for the tests.
+
+export default arrayLength;
diff --git a/exercises/10-loops/02-while-loop.js b/exercises/10-loops/02-while-loop.js
new file mode 100644
index 0000000..afc90cc
--- /dev/null
+++ b/exercises/10-loops/02-while-loop.js
@@ -0,0 +1,32 @@
+/**
+ * Using a while loop, log the following numbers:
+ * 10, 20, 30, 40, 50, 60, 70, 80, 90, 100
+ *
+ * @example
+ * logArrayWithWhile();
+ * // 10
+ * // 20
+ * // 30
+ * // 40
+ * // 50
+ * // 60
+ * // 70
+ * // 80
+ * // 90
+ * // 100
+ */
+
+const logWithWhile = () => {
+ // WRITE YOUR ANSWER HERE
+ let counter = 10;
+ while (counter <= 100) {
+ console.log(counter);
+ counter = counter + 10;
+ }
+};
+
+console.log(logWithWhile());
+
+// IGNORE THIS BELOW. It is for the tests.
+
+export default logWithWhile;
diff --git a/exercises/10-loops/03-for-loop.js b/exercises/10-loops/03-for-loop.js
new file mode 100644
index 0000000..bd54aee
--- /dev/null
+++ b/exercises/10-loops/03-for-loop.js
@@ -0,0 +1,25 @@
+/**
+ * Using a for loop, lop through an array
+ * and log each item with console.log
+ * @param {array} array
+ *
+ * @example
+ * const array = ["Honda", "Ford", "Ferrari"];
+ * logArrayWithFor(array);
+ * // Honda
+ * // Ford
+ * // Ferrari
+ */
+
+const logArrayWithFor = (array) => {
+ // WRITE YOUR ANSWER HERE
+ for (let i = 0; i < array.length; i++) {
+ let item = array[i];
+ console.log(item);
+ }
+};
+logArrayWithFor(["Honda", "Ford", "Ferrari"]);
+
+// IGNORE THIS BELOW. It is for the tests.
+
+export default logArrayWithFor;
diff --git a/exercises/10-loops/04-loops.html b/exercises/10-loops/04-loops.html
new file mode 100755
index 0000000..c5c2fca
--- /dev/null
+++ b/exercises/10-loops/04-loops.html
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+ EXERCISE
+
+
+
+
+
+
+
Place
+
Name
+
+
+
+
+
+
+
diff --git a/exercises/10-loops/05-add-an-array.js b/exercises/10-loops/05-add-an-array.js
new file mode 100755
index 0000000..d8a5ea8
--- /dev/null
+++ b/exercises/10-loops/05-add-an-array.js
@@ -0,0 +1,24 @@
+/**
+ * Add all of the numbers in an array and return the sum.
+ * @param {array} numbers an array of numbers
+ * @returns {number} the sum of all the numbers in an array
+ *
+ * @example add([1, 2, 3]); // 6
+ */
+
+const add = (numbers) => {
+ // WRITE YOUR ANSWER HERE
+
+ //let sumArray = [numbers]; //?? how to set up (get arguments into?) an array
+ let sum = 0;
+ for (let i = 0; i < numbers.length; i++) {
+ sum += numbers[i];
+ }
+
+ return sum;
+};
+add([16, 12, 2]);
+
+// IGNORE THIS BELOW. It is for the tests.
+
+export default add;
diff --git a/exercises/10-loops/06-highest-number.js b/exercises/10-loops/06-highest-number.js
new file mode 100755
index 0000000..52db502
--- /dev/null
+++ b/exercises/10-loops/06-highest-number.js
@@ -0,0 +1,31 @@
+/**
+ * Loop through the array using a for loop (or for ... of loop) and return the highest number
+ * @param {array} numbers array of numbers
+ * @returns {number} the highest number that was in the array
+ *
+ * @example highestNumber([1, 10, 2, 3, 4]) // 10
+ * @example highestNumber([-1, -5, -4]) // -1
+ *
+ */
+
+const highestNumber = (numbers) => {
+ // WRITE YOUR ANSWER HERE
+
+ // I adopted this solution from https://stackoverflow.com/questions/54623431/find-the-biggest-number-in-an-array-by-using-javascript-loops
+ //Answered by user Jack Bashford
+
+ let highNum = -Infinity;
+
+ for (let i = 0; i < numbers.length; i++) {
+ if (numbers[i] > highNum) {
+ highNum = numbers[i];
+ }
+ }
+ return highNum;
+};
+
+console.log(highestNumber([30, 690, -242, 683]));
+
+// IGNORE THIS BELOW. It is for the tests.
+
+export default highestNumber;
diff --git a/exercises/10-loops/07-is-palidrome.js b/exercises/10-loops/07-is-palidrome.js
new file mode 100755
index 0000000..b431631
--- /dev/null
+++ b/exercises/10-loops/07-is-palidrome.js
@@ -0,0 +1,25 @@
+/**
+ * Check to see if a string is a palindrome.
+ * A palindrome is a word, phrase, or sequence that reads the same backward as forward, e.g., madam or racecar.
+ * Use the split and join methods to solve this problem.
+ * @param {string} string
+ * @returns {boolean} true is a string is a palindrome, false if it is not.
+ * @example isPalindrome("eye"); // true
+ * @example isPalindrome("nope"); // false
+ */
+
+const isPalindrome = (string) => {
+ // WRITE YOUR ANSWER HERE
+
+ let stringReversed = string.split("").reverse().join("");
+
+ if (string === stringReversed) {
+ return true;
+ } else return false;
+};
+isPalindrome("kayak");
+console.log(isPalindrome("kayak"));
+
+// IGNORE THIS BELOW. It is for the tests.
+
+export default isPalindrome;
diff --git a/exercises/11-objects/01-create-object.js b/exercises/11-objects/01-create-object.js
new file mode 100644
index 0000000..945db6a
--- /dev/null
+++ b/exercises/11-objects/01-create-object.js
@@ -0,0 +1,18 @@
+/**
+ * Create an object "myDog" that represents a dog. It should contain the properties:
+ * @property {string} name
+ * @property {string} breed
+ * @property {number} age
+ * @property {array} owners (array of strings)
+ * Each should have a value.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+const myDog = {
+ name: "Bassey",
+ breed: "Lab",
+ age: 3,
+ owners: ["Jack", "Floria"],
+};
+console.log(myDog);
diff --git a/exercises/11-objects/02-create-nested-object.js b/exercises/11-objects/02-create-nested-object.js
new file mode 100644
index 0000000..63ccf94
--- /dev/null
+++ b/exercises/11-objects/02-create-nested-object.js
@@ -0,0 +1,42 @@
+let name = "Eddie Willard"; // e.g.
+let graduationYear = 2022; // e.g.
+let skills = ["Javascript", "React", "CSS"]; // e.g.
+let githubLink = "https://github.com/example/profile"; // e.g.
+let linkedInLink = "https://linkedin.com/profile"; // e.g.
+
+/**
+ * Create a nested object called "graduate".
+ * Assigns "name", "graduationYear", and many of the other values above to the object
+ * in this format:
+ * @property {string} name
+ * @property {string} graduationYear
+ * @property {array} skills
+ * @property {object} links e.g. { github: "...", linkedIn: "..." }
+ *
+ * @example
+ * console.log(graduate); //
+ * {
+ * name: "Eddie Willard",
+ * graduationYear: 2021,
+ * skills: ["JavaScript", "React", "CSS"],
+ * links: {
+ * github: "https://github.com/example/profile",
+ * linkedIn: "https://linkedin.com/profile"
+ * }
+ * }
+ *
+ * Your answer should work with "name", "graduation", and the other variables above
+ * are different values.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+let graduate = {
+ name,
+ graduationYear,
+ skills,
+ links: {
+ githubLink,
+ linkedInLink,
+ },
+};
+console.log(graduate);
diff --git a/exercises/11-objects/03-accessing-item-in-object.js b/exercises/11-objects/03-accessing-item-in-object.js
new file mode 100644
index 0000000..4096c18
--- /dev/null
+++ b/exercises/11-objects/03-accessing-item-in-object.js
@@ -0,0 +1,17 @@
+const clothes = {
+ hat: "ballcap",
+ shirt: "jersey",
+ shoes: "cleats",
+};
+
+/**
+ * Create a variable called "hat".
+ * It should be equal to whatever the "hat" property is inside of the "clothes" object.
+ * This should still work when "clothes" has different values.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+let hat = clothes["hat"];
+
+console.log(hat);
diff --git a/exercises/11-objects/04-update-object.js b/exercises/11-objects/04-update-object.js
new file mode 100644
index 0000000..f4511a2
--- /dev/null
+++ b/exercises/11-objects/04-update-object.js
@@ -0,0 +1,21 @@
+let student = {
+ name: "Maria Gómez",
+ skills: ["JavaScript"],
+};
+
+/**
+ * Update the "student" object name to equal your name.
+ * Add another skill to the "skills" array.
+ * @example
+ * console.log(student);
+ * {
+ * name: "Jamal Taylor",
+ * skills: ["JavaScript", "Being a permanent student"],
+ * };
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+student.name = "Hal Katzman";
+student.skills.push("HTML");
+
+console.log(student);
diff --git a/exercises/11-objects/05-return-object-values.js b/exercises/11-objects/05-return-object-values.js
new file mode 100644
index 0000000..89027f5
--- /dev/null
+++ b/exercises/11-objects/05-return-object-values.js
@@ -0,0 +1,35 @@
+/**
+ * Return all the properties contained in the "blogPost" object.
+ * @param {object} blogPost
+ * @returns {array} of strings
+ *
+ * @example
+ *
+ * const blogPost = {
+ * title: "Building a Form Validation API",
+ * author: "Mark Marshall",
+ * date: "2021-08-05",
+ * content:
+ * "It's required! Let's learn how to leverage the JavaScript Constraint API to remind your users when they need to finish filling out those pesky form fields. And we will show you how to do this with keeping accessibility in mind. ...",
+ * };
+ *
+ * returnObjectValues(blogPost);
+ * // ["Building a Form Validation API", "Mark Marshall", "2021-08-05", "It's required! Let's learn how to leverage the JavaScript Constraint API to remind your users when they need to finish filling out those pesky form fields. And we will show you how to do this with keeping accessibility in mind. ..."]
+ */
+
+const returnObjectValues = (blogPost) => {
+ // WRITE YOUR ANSWER HERE
+ let values = Object.values(blogPost);
+ console.log(values);
+ return values;
+};
+returnObjectValues({
+ title: "An Interesting Fact About Me, A Month Late",
+ author: "Paul Mermod",
+ date: "2022-11-05",
+ content: "I have a Bachelor of Fine Arts and worked in accounting.",
+});
+
+// IGNORE THIS BELOW. It is for the tests.
+
+export default returnObjectValues;
diff --git a/exercises/11-objects/06-combine-object.js b/exercises/11-objects/06-combine-object.js
new file mode 100644
index 0000000..e07b6d9
--- /dev/null
+++ b/exercises/11-objects/06-combine-object.js
@@ -0,0 +1,23 @@
+/**
+ * Combine two objects into one
+ * @param {object} obj1
+ * @param {object} obj2
+ * @return {object} obj1 and obj2 combined
+ *
+ * @example
+ * const obj1 = { firstName: "Clark" }
+ * const obj2 = { lastName: "Kent" }
+ * combineObjects(obj1, obj2); // { firstName: "Clark", lastName: "Kent" }
+ */
+
+const combineObjects = (obj1, obj2) => {
+ // WRITE YOUR ANSWER HERE
+ let combined = { ...obj1, ...obj2 };
+ console.log(combined);
+ return combined;
+};
+
+combineObjects({ city: "Albany" }, { state: "NY" });
+// IGNORE THIS BELOW. It is for the tests.
+
+export default combineObjects;
diff --git a/exercises/12-loops-objects/01-loop-through-object.js b/exercises/12-loops-objects/01-loop-through-object.js
new file mode 100644
index 0000000..ae16690
--- /dev/null
+++ b/exercises/12-loops-objects/01-loop-through-object.js
@@ -0,0 +1,36 @@
+/**
+ * Loop through all properties within the "links" object
+ * an return a list of HTML links.
+ * @param {object} links e.g. { Text: "https://url.com" }
+ * @returns {string} of tags
+ *
+ * @example
+ *
+ * const links = {
+ * Dogs: "http://www.omfgdogs.com",
+ * Kittens: "https://giphy.com/search/kitten",
+ * "Hamster Dance": "https://hamster.dance/hamsterdance/",
+ * };
+ *
+ * generateLinks(links);
+ * // DogsKittensHamster Dance
+ */
+
+const generateLinks = (links) => {
+ // WRITE YOUR ANSWER HERE
+ for (let oneLink in links) {
+ let title = links[oneLink];
+ console.log('' + oneLink + "");
+ }
+};
+
+const links = {
+ Dogs: "http://www.omfgdogs.com",
+ Kittens: "https://giphy.com/search/kitten",
+ "Hamster Dance": "https://hamster.dance/hamsterdance/",
+};
+
+generateLinks(links);
+// IGNORE THIS BELOW. It is for the tests.
+
+export default generateLinks;
diff --git a/exercises/12-loops-objects/02-loop-through-object.html b/exercises/12-loops-objects/02-loop-through-object.html
new file mode 100644
index 0000000..ae64ab4
--- /dev/null
+++ b/exercises/12-loops-objects/02-loop-through-object.html
@@ -0,0 +1,77 @@
+
+
+
+
+
+
+
+ EXERCISE
+
+
+
+
+
Now Playing
+
+
+
+
+
diff --git a/exercises/13-more-conditionals/01-ternary-operator.js b/exercises/13-more-conditionals/01-ternary-operator.js
new file mode 100644
index 0000000..73203bb
--- /dev/null
+++ b/exercises/13-more-conditionals/01-ternary-operator.js
@@ -0,0 +1,18 @@
+let num = 8; // e.g.
+
+/**
+ * This is similar to an older problem.
+ * Solve this problem with the ternary operator this time.
+ *
+ * Create a variable called "isEvenOrOdd". (Do not use var.)
+ * If "num" is even, "isEvenOrOdd" should equal the string "even".
+ * Otherwise, "isEvenOrOdd" should equal the string "odd".
+ * Your answer should still work when "num" is a different value.
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+let isEvenOrOdd;
+let remainder = num % 2;
+isEvenOrOdd = remainder === 0 ? "even" : "odd";
+
+console.log(isEvenOrOdd);
diff --git a/exercises/13-more-conditionals/02-short-circuiting.js b/exercises/13-more-conditionals/02-short-circuiting.js
new file mode 100644
index 0000000..2982947
--- /dev/null
+++ b/exercises/13-more-conditionals/02-short-circuiting.js
@@ -0,0 +1,13 @@
+let error = "Username already exists."; // When the test runs, this could also be an empty string
+
+/**
+ * Use short circuiting to solve this problem.
+ *
+ * Create a variable called "errorMessage".
+ * If "error" has a message (in order words, its a string that isn't an empty string),
+ * then "errorMessage" should equal that message.
+ * If "error" is equal to an empty string or some other falsy value,
+ * then "errorMessage" should equal "An unexpected error occurred.".
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
diff --git a/exercises/15-callbacks/01-calculate.js b/exercises/15-callbacks/01-calculate.js
new file mode 100644
index 0000000..9e14b34
--- /dev/null
+++ b/exercises/15-callbacks/01-calculate.js
@@ -0,0 +1,41 @@
+/**
+ * Perform a calculation on numbers.
+ * @param {number} num1 number
+ * @param {number} num2 number
+ * @param {function} callback that performs an operation on two numbers
+ * @returns {number} that is the result of a callback
+ *
+ * callback
+ * @param {number} num1 number
+ * @param {number} num2 number
+ * @returns {number} that is the result of a calculation like add or subtract
+ *
+ * @example
+ * const add = (a, b) => {
+ * return a + b;
+ * }
+ * const subtract = (a, b) => {
+ * return a - b;
+ * }
+ * console.log( calculate(5, 10, add) ); // 15
+ * console.log( calculate(7, 3, subtract) ); // 4
+ */
+
+const calculate = (num1, num2, callback) => {
+ // WRITE YOUR ANSWER HERE
+ return callback(num1, num2);
+};
+
+const divide = (num1, num2) => {
+ return num1 / num2;
+};
+
+const multiply = (num1, num2) => {
+ return num1 * num2;
+};
+
+console.log(calculate(10, 3, divide));
+console.log(calculate(500, 100, multiply));
+// IGNORE THIS BELOW. It is for the tests.
+
+export { calculate };
diff --git a/exercises/15-callbacks/02-print-names.js b/exercises/15-callbacks/02-print-names.js
new file mode 100644
index 0000000..b61b770
--- /dev/null
+++ b/exercises/15-callbacks/02-print-names.js
@@ -0,0 +1,52 @@
+/**
+ * This is a question with two parts.
+ *
+ * PART 1
+ * Create a function called "printer".
+ * Given a student name, it should format and prints out the value in a visually appealing way
+ * (e.g. with hyphens or asterisks before each value) with `console.log`
+ * slide
+ * @example
+ * - Jamal
+ * - Matina
+ * @param {string} name instructor name
+ */
+
+// WRITE PART 1 OF YOUR ANSWER HERE
+const printer = (name) => {
+ console.log("**" + name);
+};
+
+/**
+ * PART 2
+ * NOTE that the test will use the "printer" function that you completed in the problem above.
+ * Loop through the array of strings.
+ * For each name, calls upon the function "printer" to print out the name
+ * @param {array}
+ * @param {function} callback printer function
+ *
+ * @example
+ * printNames(["Jamal", "Matina"], printer);
+ * // - Jamal
+ * // - Matina
+ */
+const printNames = (array, callback) => {
+ // WRITE PART 2 OF YOUR ANSWER HERE
+ for (let item of array) {
+ printer(item);
+ }
+};
+
+// IGNORE THIS BELOW. It is for the tests.
+
+const myExports = {
+ printer: undefined,
+ printNames,
+};
+try {
+ //eslint-disable-next-line no-undef
+ if (printer) myExports.printer = printer;
+ // eslint-disable-next-line no-undef
+} catch (e) {}
+
+export default myExports;
diff --git a/exercises/15-callbacks/03-find-first.js b/exercises/15-callbacks/03-find-first.js
new file mode 100644
index 0000000..f674104
--- /dev/null
+++ b/exercises/15-callbacks/03-find-first.js
@@ -0,0 +1,34 @@
+/**
+ * Returns the first number in an array that meets a condition.
+ * @param {array} arrayOfNum e.g. [3,4, 20, 333]
+ * @param {function} callback that receives a number and returns true or false
+ * @returns {number} in the array that is the result of the callback
+ *
+ * callback
+ * @param {number} num an item in an array
+ * @returns {boolean} if a number meets a condition
+ *
+ * @example
+ * const isNumberEven = (num) => {
+ * if (num % 2 === 0) return true;
+ * else return false;
+ * };
+ * const isNumberTwoDigits = (num) => {
+ * if (`${num}`.length === 2) {
+ * return true;
+ * } else return false;
+ * };
+ * console.log( findFirst([1, 3, 7, 8, 20], isNumberEven) ) // 8
+ * console.log( findFirst([4, 500, 30, 2], isNumberTwoDigits) ) // 30
+ */
+
+const findFirst = (arrayOfNum, callback) => {
+ // WRITE YOUR ANSWER HERE
+ for (let num of arrayOfNum) {
+ if (callback(num)) return num;
+ }
+};
+
+// IGNORE THIS BELOW. It is for the tests.
+
+export { findFirst };
diff --git a/exercises/15-callbacks/04-link-or-button.js b/exercises/15-callbacks/04-link-or-button.js
new file mode 100644
index 0000000..dc423e3
--- /dev/null
+++ b/exercises/15-callbacks/04-link-or-button.js
@@ -0,0 +1,32 @@
+// E.g. do not change me
+const createLink = (text) => {
+ return `${text}`;
+};
+
+// E.g. do not change me
+const createButton = (text) => {
+ return ``;
+};
+
+/**
+ * Update the createCallToAction so that it can either:
+ * 1. Use createLink
+ * 2. Use createButton
+ *
+ * You must use a callback to solve this problem.
+ */
+
+const createCallToAction = (callback, clickableText) => {
+ return (
+ "
Limited Time: Members Save 30% " +
+ callback(clickableText) +
+ "
"
+ );
+};
+
+// Update me too
+createCallToAction(createLink, "Book Now");
+
+// IGNORE THIS BELOW. It is for the tests.
+
+export { createCallToAction };
diff --git a/exercises/15-callbacks/05-send-email.js b/exercises/15-callbacks/05-send-email.js
new file mode 100644
index 0000000..28924c9
--- /dev/null
+++ b/exercises/15-callbacks/05-send-email.js
@@ -0,0 +1,29 @@
+// E.g.
+const askForUpdate = () => {
+ return "Hi John. Is there any update on this?";
+};
+
+/**
+ * Create a function called "sendEmail".
+ * It should accept a callback as a parameter.
+ * The callback should return the contents of an email as a string
+ * "sendEmail" should use console.log to print the callback to the screen.
+ *
+ * sendEmail
+ * @param {function} callback the callback function
+ * uses console.log to print the callback to the screen
+ *
+ * the callback function
+ * @returns {string} the text in an email
+ *
+ * @example
+ * sendEmail(askForUpdate); // Hi. John. Is there any update on this?
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+
+const sendEmail = (callback) => {
+ console.log(callback());
+};
+
+//sendEmail(askForUpdate);
diff --git a/exercises/16-for-each/01-lowest-num.js b/exercises/16-for-each/01-lowest-num.js
new file mode 100644
index 0000000..ff0757e
--- /dev/null
+++ b/exercises/16-for-each/01-lowest-num.js
@@ -0,0 +1,14 @@
+let lowestNumber = Infinity; // This is the highest possible number in JavaScript
+const numbers = [1, 10, -2, 3, 4]; // e.g.
+
+/**
+ * Using ".forEach", loop through the array "numbers"
+ * and set "lowestNumber" equal to the lowest number in the array.
+ *
+ * Your answer should still work if there are different numbers inside the array "numbers".
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+numbers.forEach((num, i) => {
+ if (num < lowestNumber) lowestNumber = num;
+});
diff --git a/exercises/16-for-each/02-generate-links.js b/exercises/16-for-each/02-generate-links.js
new file mode 100644
index 0000000..4cd7432
--- /dev/null
+++ b/exercises/16-for-each/02-generate-links.js
@@ -0,0 +1,29 @@
+let htmlStr = "";
+const links = [
+ // e.g.
+ "http://speakingjs.com/es5/ch04.html",
+ "https://www.ecma-international.org/",
+ "https://www.google.com/books/edition/Eloquent_JavaScript_3rd_Edition/p1v6DwAAQBAJ",
+];
+
+/**
+ * You can imagine you are creating a list of reference links at the bottom of a Wikipedia page.
+ *
+ * Using ".forEach", loop through an array of URLs,
+ * create a tag string for each link,
+ * and append the tag string to the variable "htmlStr"
+ *
+ * @example
+ * // After you solve this problem, "htmlStr" should equal:
+ * 1. http://speakingjs.com/es5/ch04.html2. https://www.ecma-international.org/3. https://books.google.com/books?id=2weL0iAfrEMC
+ *
+ * HINT: You will need to use the index in the array to solve this problem.
+ *
+ * Your answer should still work if there are different URLs inside of the "links" array.
+ *
+ */
+
+// WRITE YOUR ANSWER BELOW THIS LINE
+links.forEach((link, i) => {
+ return (htmlStr += ` ${i + 1}. ${link}`);
+});
diff --git a/exercises/17-targeting-dom/targeting-dom.html b/exercises/17-targeting-dom/targeting-dom.html
new file mode 100644
index 0000000..b381ed9
--- /dev/null
+++ b/exercises/17-targeting-dom/targeting-dom.html
@@ -0,0 +1,120 @@
+
+
+
+
+
+ EXERCISES Targeting DOM
+
+
+
+
+
+
+ You will need to inspect this with your browser tools to see if this
+ worked. Press option + command + i on a
+ Mac or ctrl + shift + i on Windows and
+ open the Console tab.
+
+
+
+
+
Single elements
+
+ Do not modify the HTML in this <section>.
+
+
+
+ Target this first <li> element, but no other
+ <li> elements .
+
+
Target this element with an id of myId.
+
+
+
+
+
Groups of elements
+
+ Do not modify the HTML in this <section>.
+
+
+ Target every <li> element below that has a yellow
+ background with a single document.query____.
+
+
+
Do not target me.
+
+ Target this element and every other element with the class
+ bg-warning.
+
+
Do not target me.
+
+ Target this element and every other element with the class
+ bg-warning.
+
+
+ Target this element and every other element with the class
+ bg-warning.
+
+
+
+
+
+
Structuring your HTML for JavaScript
+
+ You will need to modify the HTML in this <section>.
+
+
+ Target the button labeled "Target Me" only. You will need to modify the
+ HTML.
+
+
+
+
+
+
+
+
+ Target every <a> element below that is a social media
+ site with a single document.query____. You will need to
+ modify the HTML.
+
+
+
+
diff --git a/exercises/17-targeting-dom/targeting-dom.js b/exercises/17-targeting-dom/targeting-dom.js
new file mode 100644
index 0000000..f7dc3fc
--- /dev/null
+++ b/exercises/17-targeting-dom/targeting-dom.js
@@ -0,0 +1,34 @@
+/**
+ * You will be targeting DOM elements (the HTML) on the page using
+ * "document.querySelector" or "document.querySelectorAll"
+ * You will then use "console.log" to print the results.
+ *
+ * @example console.log( document.querySelector("#myTarget") );
+ *
+ * When you use "document.querySelectorAll", you must loop through each
+ * element in the collection and console.log each element. (See the slides)
+ *
+ * Do not change the HTML unless you are instructed to do so.
+ */
+(function () {
+ // Put your answers in here
+ let li1 = document.querySelector("li");
+ console.log(li1);
+ let li2 = document.querySelector("#myId");
+ console.log(li2);
+ /******/
+ let warnings = document.querySelectorAll(".bg-warning");
+ for (let warning of warnings) {
+ console.log(warning);
+ }
+ /********/
+ let button = document.querySelector("#target-button");
+ console.log(button);
+ /*******/
+ let anchors = document.querySelectorAll(".social");
+ for (let anchor of anchors) {
+ console.log(anchor);
+ /********/
+ let cells = document.querySelectorAll("");
+ }
+})();
diff --git a/exercises/18-dom-attributes/dom-attributes.html b/exercises/18-dom-attributes/dom-attributes.html
new file mode 100644
index 0000000..0be6cbd
--- /dev/null
+++ b/exercises/18-dom-attributes/dom-attributes.html
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+ Document
+
+
+
+
+
+
diff --git a/exercises/18-transforming-dom/transforming-dom.html b/exercises/18-transforming-dom/transforming-dom.html
new file mode 100644
index 0000000..d5a627a
--- /dev/null
+++ b/exercises/18-transforming-dom/transforming-dom.html
@@ -0,0 +1,89 @@
+
+
+
+
+
+ EXERCISES Transforming DOM
+
+
+
+
+
+
+ Change the text inside this <div> to say "I am
+ victorious!"
+
+
+
+ Change the background color of this <div> to another
+ color using inline styles.
+
+
+
+ Change the text color of this <div> to another color by
+ changing the class.
+ See Bootstrap colors.
+
+
+
+ Hide this <div> using inline styles.
+
+
+
+ Show the hidden <div> below by modifying the
+ class in some way.
+
+
Peek a boo!
+
+
+
+ Using conditional logic (e.g. an if statement), change the
+ <div> below to say "✓ blue" if
+
+ has class btn-primary.
+
+
+
+
+
+
+
diff --git a/exercises/18-transforming-dom/transforming-dom.js b/exercises/18-transforming-dom/transforming-dom.js
new file mode 100644
index 0000000..d138cb4
--- /dev/null
+++ b/exercises/18-transforming-dom/transforming-dom.js
@@ -0,0 +1,29 @@
+/**
+ * You will follow the instructions in the transforming-dom.html
+ * to transform various elements on the page in different ways.
+ * You may modify the HTML to add ids, classes, data attributes, etc.
+ */
+(function () {
+ // Put your answers in here
+ const img = document.querySelector("img");
+ img.src = "https://media.giphy.com/media/3oKIPnAiaMCws8nOsE/giphy.gif";
+ //
+ const link = document.querySelector("#jsref");
+ link.href = "https://developer.mozilla.org/en-US/docs/Web/JavaScript";
+ //
+ const text = document.querySelector("#textchange");
+ text.textContent = "I am victorious!";
+ //
+ const bgColor = document.querySelector("#colorchange");
+ bgColor.style.backgroundColor = "#bbbbbb";
+ //
+ //const TxtClassColor = document.querySelector("text-info");
+ //
+ const divToHide = document.querySelector("#hide");
+ divToHide.style.display = "none";
+
+ const myButton = document.querySelector("#button1");
+ if (myButton.classList.contains("btn-primary")) {
+ myButton.textContent = "checkmark blue";
+ }
+})();
diff --git a/exercises/19-click-events/click-events.html b/exercises/19-click-events/click-events.html
new file mode 100644
index 0000000..48cedef
--- /dev/null
+++ b/exercises/19-click-events/click-events.html
@@ -0,0 +1,48 @@
+
+
+
+
+
+
+ EXERCISES Events
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/exercises/19-click-events/click-events.js b/exercises/19-click-events/click-events.js
new file mode 100644
index 0000000..4d5aca7
--- /dev/null
+++ b/exercises/19-click-events/click-events.js
@@ -0,0 +1,31 @@
+(function () {
+ /**
+ * You have two challenges to solve below with Vanilla JavaScript.
+ * You are allowed to make changes to the HTML and CSS.
+ */
+ /**
+ * Problem 1: Alert Me
+ * When the clicks on the button that says "Alert Me!", it should display an alert.
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/Window/alert
+ */
+ // Write your answer here
+ const button1 = document.querySelector("#btn1");
+ const eventHandler = (click) => {
+ alert("You clicked me!");
+ };
+ button1.addEventListener("click", eventHandler);
+ /**
+ * Problem 2: Disable a button that will charge a credit card.
+ *
+ * To prevent users from charging the credit card more than once:
+ * 1. Disable the button when it is clicked.
+ * 2. Change the text to say e.g. "Loading ..." once it is clicked.
+ */
+ // Write your answer here
+ const creditCardButton = document.querySelector("#btn2");
+ const chargeOnce = () => {
+ creditCardButton.textContent = "Loading...";
+ creditCardButton.disabled = "disabled";
+ };
+ creditCardButton.addEventListener("click", chargeOnce);
+})();
diff --git a/exercises/20-toggle-events/toggle-events.html b/exercises/20-toggle-events/toggle-events.html
new file mode 100644
index 0000000..e2c8eeb
--- /dev/null
+++ b/exercises/20-toggle-events/toggle-events.html
@@ -0,0 +1,114 @@
+
+
+
+
+
+
+ EXERCISES Events
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ We use cookies to give you the best online experience, measure your
+ visits to our sites and to enable marketing activities (including with
+ our marketing partners).
+
+
+
+
+
+
+
+
+ Icy Road Conditions Lead To Multi-Deer Pileup On Highway
+
+ This comment doesn't add any value to the conversation.
+
December 5, 2022
+
+
+
+
+
+
+
diff --git a/exercises/20-toggle-events/toggle-events.js b/exercises/20-toggle-events/toggle-events.js
new file mode 100644
index 0000000..8e3f299
--- /dev/null
+++ b/exercises/20-toggle-events/toggle-events.js
@@ -0,0 +1,44 @@
+(function () {
+ /**
+ * Problem 1: Dismiss the "Accept Cookies" popup
+ *
+ * When the user clicks on the "Accept Cookies" button, the "Accept Cookies" popup should disappear.
+ */
+ const cookiesPopup = document.querySelector("#acceptCookiesPopup");
+ const cookiesButton = document.querySelector("#acceptCookiesButton");
+ const accept = () => {
+ cookiesPopup.style.display = "none";
+ };
+ cookiesButton.addEventListener("click", accept);
+
+ // Write your answer here
+ /* * Problem 2: Show comments for the news story.
+ *
+ * You will need modify the HTML so that you can target HTML elements o the page.
+ *
+ * You will be toggling the comments on the page.
+ * If the comments are hidden, this should happen when the user clicks on the "View Comments" button:
+ * 1. The comment section should appear
+ * 2. The "View Comments" button will change to say "Hide Comments"
+ *
+ * If the comments are visible, this should happen when the user clicks on the "Hide Comments" button:
+ * 1. The comments sections should disappear
+ * 2. The "Hide Comments" button should change to say "View Comments"
+ *
+ * HINT: Right now, the comments are hidden because they have the class ".hidden",
+ * but you can switch up the HTML so that it uses inline styles if you like.
+ */
+ // Write your answer here
+ const commentsButton = document.querySelector("#commentsButton");
+ const comments = document.querySelector("#comments");
+
+ commentsButton.addEventListener("click", () => {
+ if (comments.classList.contains("hidden")) {
+ comments.classList.remove("hidden");
+ commentsButton.textContent = "Hide Comments";
+ } else {
+ comments.classList.add("hidden");
+ commentsButton.textContent = "View Comments";
+ }
+ });
+})();
diff --git a/exercises/21-forms/forms.html b/exercises/21-forms/forms.html
new file mode 100644
index 0000000..c4d9ccf
--- /dev/null
+++ b/exercises/21-forms/forms.html
@@ -0,0 +1,107 @@
+
+
+
+
+
+
+ EXERCISES Events
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/exercises/21-forms/forms.js b/exercises/21-forms/forms.js
new file mode 100644
index 0000000..0988c9a
--- /dev/null
+++ b/exercises/21-forms/forms.js
@@ -0,0 +1,66 @@
+(function () {
+ /**
+ * You have three challenges to solve below with Vanilla JavaScript.
+ * You are allowed to make changes to the HTML and CSS.
+ */
+ /**
+ * Problem 1: Rendering what a user is typing on the page.
+ *
+ * When the user types inside the textbook labeled "Enter mystery text here",
+ * it should display what the user is typing in the tags below.
+ */
+ // Write your answer here
+ const textBox = document.querySelector("#textbox");
+ const inputMessage = document.querySelector("#inputmessage");
+ textBox.addEventListener("input", (event) => {
+ inputMessage.textContent = event.target.value;
+ });
+ /**
+ * Problem 2: Display the results of the world's most pointless search engine.
+ *
+ * When the user types in the textbook and either clicks "Search" button or hits the enter key,
+ * display the message "No results for ___ found" inside of this below.
+ * For example, if the user searches for "Indian Ocean", display "No results for Indian Ocean found".
+ * (Since there are no oceans near Albany, NY, the search engine should
+ * display the "No results for ___ found" message every time.)
+ *
+ * The exercise must be completed with a form handler
+ * and you must prevent the page from refreshing when the form is submitted.
+ */
+ // Write your answer here
+
+ const searchForm = document.querySelector("#search-form");
+ const results = document.querySelector("#search-results");
+ searchForm.addEventListener("submit", (e) => {
+ e.preventDefault();
+ const input = document.querySelector("#input").value;
+ results.textContent = `No results for ${input} found`;
+ });
+ /**
+ * Problem 3: Agree to the terms and conditions
+ *
+ * Whenever the user clicks the "Continue" button, if she has not agreed to the terms,
+ * the error "You must agree to the terms and conditions" should appear
+ * and the label "I Agree to the Terms and Conditions" should turn red.
+ * If she has, then display "Thank you for signing up".
+ *
+ * To start, you will need to hide some element on the page and change the input's classes.
+ */
+ // Write your answer here
+
+ const checkBox = document.querySelector("#check-box");
+ const formTerms = document.querySelector("#form-terms");
+ const textSuccess = document.querySelector("#text-sucess");
+ const textDanger = document.querySelector("#text-danger");
+ const labelAgree = document.querySelector("#label-agree");
+
+ formTerms.addEventListener("click", (e) => {
+ //e.preventDefault();
+ if (checkBox.target.checked) {
+ textSuccess.classList.remove(".hidden");
+ } else {
+ labelAgree.classList.add(".is-invalid");
+ textDanger.classList.remove(".hidden");
+ }
+ });
+})();
diff --git a/exercises/22-identify-elements/bulma-pricingtable.min.css b/exercises/22-identify-elements/bulma-pricingtable.min.css
new file mode 100644
index 0000000..512ffa4
--- /dev/null
+++ b/exercises/22-identify-elements/bulma-pricingtable.min.css
@@ -0,0 +1,4 @@
+/**
+ * @source https://github.com/Wikiki/bulma-pricingtable
+ */
+@-webkit-keyframes spinAround{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}@keyframes spinAround{from{-webkit-transform:rotate(0);transform:rotate(0)}to{-webkit-transform:rotate(359deg);transform:rotate(359deg)}}.pricing-table{display:flex;align-items:stretch;flex-direction:row;flex-flow:row wrap;justify-content:space-between}.pricing-table.is-comparative .pricing-plan{border-radius:initial;margin:0}.pricing-table.is-comparative .pricing-plan:not(:last-child){border-right:none}.pricing-table.is-comparative .pricing-plan:first-child{border-top-left-radius:4px;border-bottom-left-radius:4px}.pricing-table.is-comparative .pricing-plan:last-child{border-top-right-radius:4px;border-bottom-right-radius:4px}.pricing-table.is-comparative .pricing-plan.is-active{border:.1rem solid #f5f5f5;border-radius:4px}.pricing-table .pricing-plan{display:flex;flex-direction:column;flex:1 1 auto;background-color:#fff;border:.1rem solid #f5f5f5;border-radius:4px;list-style-type:none;transition:.25s;margin:.5em}.pricing-table .pricing-plan .plan-header{border-top-left-radius:4px;border-top-right-radius:4px;background-color:#fff;color:#4a4a4a;font-size:1.25rem;font-weight:600;padding:.75em;align-content:center;text-align:center}.pricing-table .pricing-plan .plan-item{background:#f5f5f5;border-bottom:.1rem solid #fff;padding:.75em;align-content:center;text-align:center;font-size:.9em;color:#7a7a7a}.pricing-table .pricing-plan .plan-price{background-color:#fff;color:#4a4a4a;font-size:.75rem;font-weight:400;padding:.75em;align-content:center;text-align:center}.pricing-table .pricing-plan .plan-price .plan-price-amount{font-size:2.5rem;font-weight:700}.pricing-table .pricing-plan .plan-price .plan-price-amount .plan-price-currency{vertical-align:super;font-size:1rem!important;font-weight:400!important;color:#4a4a4a;margin-right:.25rem}.pricing-table .pricing-plan .plan-footer{border-bottom-left-radius:4px;border-bottom-right-radius:4px;padding:.75em;align-content:center;text-align:center;margin-top:auto}.pricing-table .pricing-plan.is-active{box-shadow:0 8px 12px 0 rgba(122,122,122,.2);-webkit-transform:scale(1.05);transform:scale(1.05)}.pricing-table .pricing-plan.is-active .plan-price .plan-price-amount{color:#00d1b2}.pricing-table .pricing-plan.is-active .plan-footer .button{background-color:#00d1b2;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-active .plan-footer .button.is-hovered,.pricing-table .pricing-plan.is-active .plan-footer .button:hover{background-color:#00c4a7;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-active .plan-footer .button.is-focused,.pricing-table .pricing-plan.is-active .plan-footer .button:focus{border-color:transparent;box-shadow:0 0 .5em rgba(0,209,178,.25);color:#fff}.pricing-table .pricing-plan.is-active .plan-footer .button.is-active,.pricing-table .pricing-plan.is-active .plan-footer .button:active{background-color:#00b89c;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-active .plan-footer .button[disabled]{background-color:#00d1b2;border-color:transparent}.pricing-table .pricing-plan.is-white .plan-price .plan-price-amount{color:#fff}.pricing-table .pricing-plan.is-white .plan-footer .button{background-color:#fff;border-color:transparent;color:#0a0a0a}.pricing-table .pricing-plan.is-white .plan-footer .button.is-hovered,.pricing-table .pricing-plan.is-white .plan-footer .button:hover{background-color:#f9f9f9;border-color:transparent;color:#0a0a0a}.pricing-table .pricing-plan.is-white .plan-footer .button.is-focused,.pricing-table .pricing-plan.is-white .plan-footer .button:focus{border-color:transparent;box-shadow:0 0 .5em rgba(255,255,255,.25);color:#0a0a0a}.pricing-table .pricing-plan.is-white .plan-footer .button.is-active,.pricing-table .pricing-plan.is-white .plan-footer .button:active{background-color:#f2f2f2;border-color:transparent;color:#0a0a0a}.pricing-table .pricing-plan.is-white .plan-footer .button[disabled]{background-color:#fff;border-color:transparent;box-shadow:none}.pricing-table .pricing-plan.is-black .plan-price .plan-price-amount{color:#0a0a0a}.pricing-table .pricing-plan.is-black .plan-footer .button{background-color:#0a0a0a;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-black .plan-footer .button.is-hovered,.pricing-table .pricing-plan.is-black .plan-footer .button:hover{background-color:#040404;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-black .plan-footer .button.is-focused,.pricing-table .pricing-plan.is-black .plan-footer .button:focus{border-color:transparent;box-shadow:0 0 .5em rgba(10,10,10,.25);color:#fff}.pricing-table .pricing-plan.is-black .plan-footer .button.is-active,.pricing-table .pricing-plan.is-black .plan-footer .button:active{background-color:#000;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-black .plan-footer .button[disabled]{background-color:#0a0a0a;border-color:transparent;box-shadow:none}.pricing-table .pricing-plan.is-light .plan-price .plan-price-amount{color:#f5f5f5}.pricing-table .pricing-plan.is-light .plan-footer .button{background-color:#f5f5f5;border-color:transparent;color:#363636}.pricing-table .pricing-plan.is-light .plan-footer .button.is-hovered,.pricing-table .pricing-plan.is-light .plan-footer .button:hover{background-color:#eee;border-color:transparent;color:#363636}.pricing-table .pricing-plan.is-light .plan-footer .button.is-focused,.pricing-table .pricing-plan.is-light .plan-footer .button:focus{border-color:transparent;box-shadow:0 0 .5em rgba(245,245,245,.25);color:#363636}.pricing-table .pricing-plan.is-light .plan-footer .button.is-active,.pricing-table .pricing-plan.is-light .plan-footer .button:active{background-color:#e8e8e8;border-color:transparent;color:#363636}.pricing-table .pricing-plan.is-light .plan-footer .button[disabled]{background-color:#f5f5f5;border-color:transparent;box-shadow:none}.pricing-table .pricing-plan.is-dark .plan-price .plan-price-amount{color:#363636}.pricing-table .pricing-plan.is-dark .plan-footer .button{background-color:#363636;border-color:transparent;color:#f5f5f5}.pricing-table .pricing-plan.is-dark .plan-footer .button.is-hovered,.pricing-table .pricing-plan.is-dark .plan-footer .button:hover{background-color:#2f2f2f;border-color:transparent;color:#f5f5f5}.pricing-table .pricing-plan.is-dark .plan-footer .button.is-focused,.pricing-table .pricing-plan.is-dark .plan-footer .button:focus{border-color:transparent;box-shadow:0 0 .5em rgba(54,54,54,.25);color:#f5f5f5}.pricing-table .pricing-plan.is-dark .plan-footer .button.is-active,.pricing-table .pricing-plan.is-dark .plan-footer .button:active{background-color:#292929;border-color:transparent;color:#f5f5f5}.pricing-table .pricing-plan.is-dark .plan-footer .button[disabled]{background-color:#363636;border-color:transparent;box-shadow:none}.pricing-table .pricing-plan.is-primary .plan-price .plan-price-amount{color:#00d1b2}.pricing-table .pricing-plan.is-primary .plan-footer .button{background-color:#00d1b2;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-primary .plan-footer .button.is-hovered,.pricing-table .pricing-plan.is-primary .plan-footer .button:hover{background-color:#00c4a7;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-primary .plan-footer .button.is-focused,.pricing-table .pricing-plan.is-primary .plan-footer .button:focus{border-color:transparent;box-shadow:0 0 .5em rgba(0,209,178,.25);color:#fff}.pricing-table .pricing-plan.is-primary .plan-footer .button.is-active,.pricing-table .pricing-plan.is-primary .plan-footer .button:active{background-color:#00b89c;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-primary .plan-footer .button[disabled]{background-color:#00d1b2;border-color:transparent;box-shadow:none}.pricing-table .pricing-plan.is-link .plan-price .plan-price-amount{color:#3273dc}.pricing-table .pricing-plan.is-link .plan-footer .button{background-color:#3273dc;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-link .plan-footer .button.is-hovered,.pricing-table .pricing-plan.is-link .plan-footer .button:hover{background-color:#276cda;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-link .plan-footer .button.is-focused,.pricing-table .pricing-plan.is-link .plan-footer .button:focus{border-color:transparent;box-shadow:0 0 .5em rgba(50,115,220,.25);color:#fff}.pricing-table .pricing-plan.is-link .plan-footer .button.is-active,.pricing-table .pricing-plan.is-link .plan-footer .button:active{background-color:#2366d1;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-link .plan-footer .button[disabled]{background-color:#3273dc;border-color:transparent;box-shadow:none}.pricing-table .pricing-plan.is-info .plan-price .plan-price-amount{color:#209cee}.pricing-table .pricing-plan.is-info .plan-footer .button{background-color:#209cee;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-info .plan-footer .button.is-hovered,.pricing-table .pricing-plan.is-info .plan-footer .button:hover{background-color:#1496ed;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-info .plan-footer .button.is-focused,.pricing-table .pricing-plan.is-info .plan-footer .button:focus{border-color:transparent;box-shadow:0 0 .5em rgba(32,156,238,.25);color:#fff}.pricing-table .pricing-plan.is-info .plan-footer .button.is-active,.pricing-table .pricing-plan.is-info .plan-footer .button:active{background-color:#118fe4;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-info .plan-footer .button[disabled]{background-color:#209cee;border-color:transparent;box-shadow:none}.pricing-table .pricing-plan.is-success .plan-price .plan-price-amount{color:#23d160}.pricing-table .pricing-plan.is-success .plan-footer .button{background-color:#23d160;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-success .plan-footer .button.is-hovered,.pricing-table .pricing-plan.is-success .plan-footer .button:hover{background-color:#22c65b;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-success .plan-footer .button.is-focused,.pricing-table .pricing-plan.is-success .plan-footer .button:focus{border-color:transparent;box-shadow:0 0 .5em rgba(35,209,96,.25);color:#fff}.pricing-table .pricing-plan.is-success .plan-footer .button.is-active,.pricing-table .pricing-plan.is-success .plan-footer .button:active{background-color:#20bc56;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-success .plan-footer .button[disabled]{background-color:#23d160;border-color:transparent;box-shadow:none}.pricing-table .pricing-plan.is-warning .plan-price .plan-price-amount{color:#ffdd57}.pricing-table .pricing-plan.is-warning .plan-footer .button{background-color:#ffdd57;border-color:transparent;color:rgba(0,0,0,.7)}.pricing-table .pricing-plan.is-warning .plan-footer .button.is-hovered,.pricing-table .pricing-plan.is-warning .plan-footer .button:hover{background-color:#ffdb4a;border-color:transparent;color:rgba(0,0,0,.7)}.pricing-table .pricing-plan.is-warning .plan-footer .button.is-focused,.pricing-table .pricing-plan.is-warning .plan-footer .button:focus{border-color:transparent;box-shadow:0 0 .5em rgba(255,221,87,.25);color:rgba(0,0,0,.7)}.pricing-table .pricing-plan.is-warning .plan-footer .button.is-active,.pricing-table .pricing-plan.is-warning .plan-footer .button:active{background-color:#ffd83d;border-color:transparent;color:rgba(0,0,0,.7)}.pricing-table .pricing-plan.is-warning .plan-footer .button[disabled]{background-color:#ffdd57;border-color:transparent;box-shadow:none}.pricing-table .pricing-plan.is-danger .plan-price .plan-price-amount{color:#ff3860}.pricing-table .pricing-plan.is-danger .plan-footer .button{background-color:#ff3860;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-danger .plan-footer .button.is-hovered,.pricing-table .pricing-plan.is-danger .plan-footer .button:hover{background-color:#ff2b56;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-danger .plan-footer .button.is-focused,.pricing-table .pricing-plan.is-danger .plan-footer .button:focus{border-color:transparent;box-shadow:0 0 .5em rgba(255,56,96,.25);color:#fff}.pricing-table .pricing-plan.is-danger .plan-footer .button.is-active,.pricing-table .pricing-plan.is-danger .plan-footer .button:active{background-color:#ff1f4b;border-color:transparent;color:#fff}.pricing-table .pricing-plan.is-danger .plan-footer .button[disabled]{background-color:#ff3860;border-color:transparent;box-shadow:none}@media screen and (min-width:769px),print{.pricing-table.is-comparative{margin:.5rem}.pricing-table.is-comparative.is-features{display:none}.pricing-table.is-comparative .plan-item::before{content:attr("data-feature")}.pricing-table.is-horizontal .pricing-plan{display:flex;flex-direction:row;flex-basis:100%}.pricing-table.is-horizontal .pricing-plan .plan-header{width:50%;display:flex;flex-direction:column;justify-content:center}.pricing-table.is-horizontal .pricing-plan .plan-price{width:100%;display:flex;flex-direction:row;justify-content:center}.pricing-table.is-horizontal .pricing-plan .plan-items{width:100%;background-color:#f5f5f5;columns:2;-webkit-columns:2;-moz-columns:2;-webkit-column-gap:.1rem;column-gap:.1rem}.pricing-table.is-horizontal .pricing-plan .plan-footer{width:50%;display:flex;flex-direction:column;justify-content:center;margin:auto}}@media screen and (max-width:768px){.pricing-table.is-comparative .pricing-plan{margin:.5rem}.pricing-table.is-comparative .pricing-plan.is-plan-first-mobile{order:-1}.pricing-table.is-comparative .pricing-plan.is-features{display:none}.pricing-table.is-comparative .pricing-plan .plan-item::before{content:attr(data-feature);display:block;font-weight:600;font-size:.75rem;color:#b5b5b5}}
\ No newline at end of file
diff --git a/exercises/22-identify-elements/indentify-elements.html b/exercises/22-identify-elements/indentify-elements.html
new file mode 100644
index 0000000..3362c1d
--- /dev/null
+++ b/exercises/22-identify-elements/indentify-elements.html
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+ EXERCISES Events
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
Community
+
+ $5/month
+
+
+
20GB Storage
+
1 Domain
+
1GB Bandwidth
+
-
+
+
+
+
+
+
Professional
+
+ $10/month
+
+
+
200GB Storage
+
5 Domains
+
1TB Bandwidth
+
100 Email Boxes
+
+
+
+
+
+
Enterprise
+
+ $50/month
+
+
+
2TB Storage
+
50 Domains
+
1TB Bandwidth
+
1000 Email Boxes
+
+
+
+
+
+
diff --git a/exercises/22-identify-elements/indentify-elements.js b/exercises/22-identify-elements/indentify-elements.js
new file mode 100644
index 0000000..6b5eaf2
--- /dev/null
+++ b/exercises/22-identify-elements/indentify-elements.js
@@ -0,0 +1,18 @@
+!(function () {
+ /**
+ * When the user clicks on one of the "Select" buttons to select a plan,
+ * display the following message in the aqua green notification at the top of the screen,
+ * where "Premium" is the name of the plan that user selected:
+ * "Thank you for purchasing the Premium plan!"
+ *
+ * You must use "document.querySelectorAll" to solve this problem.
+ *
+ * You can edit the HTML on the page to solve this problem.
+ *
+ * As a bonus, you can hide the notification before the user selects a plan.
+ * You can also make the "x" icon dismiss the notification.
+ */
+ // Write your answer here
+ // queryselectAll all the buttons
+ //add an event listener for each
+})();
diff --git a/exercises/23-creating-elements/creating-elements.html b/exercises/23-creating-elements/creating-elements.html
new file mode 100644
index 0000000..c0c096d
--- /dev/null
+++ b/exercises/23-creating-elements/creating-elements.html
@@ -0,0 +1,44 @@
+
+
+
+
+
+
+ EXERCISES Creating Elements
+
+
+
+
+
+
+
+
+
+
diff --git a/exercises/23-creating-elements/creating-elements.js b/exercises/23-creating-elements/creating-elements.js
new file mode 100644
index 0000000..ffa9517
--- /dev/null
+++ b/exercises/23-creating-elements/creating-elements.js
@@ -0,0 +1,8 @@
+const createElementButton = document.querySelector("#create-element-button");
+const container = document.querySelector("#container");
+
+createElementButton.addEventListener("click", () => {
+ const newElement = document.createElement("div");
+ newElement.innerHTML = "This is a new element";
+ container.appendChild(newElement);
+});
diff --git a/exercises/24-http-and-rest/404-not-found.png b/exercises/24-http-and-rest/404-not-found.png
new file mode 100644
index 0000000..830e88e
Binary files /dev/null and b/exercises/24-http-and-rest/404-not-found.png differ
diff --git a/exercises/24-http-and-rest/README.md b/exercises/24-http-and-rest/README.md
new file mode 100644
index 0000000..2273c5f
--- /dev/null
+++ b/exercises/24-http-and-rest/README.md
@@ -0,0 +1,3 @@
+# HTTP and REST APIs
+
+This is a quiz assignment you will need to complete in Teams. The assignment is called "24 HTTP and REST APIs". I'm using this Github folder to host the images that are used in the assignment.
diff --git a/exercises/24-http-and-rest/create-user-thunderclient.png b/exercises/24-http-and-rest/create-user-thunderclient.png
new file mode 100644
index 0000000..428f388
Binary files /dev/null and b/exercises/24-http-and-rest/create-user-thunderclient.png differ
diff --git a/exercises/24-http-and-rest/list-of-users-doc.png b/exercises/24-http-and-rest/list-of-users-doc.png
new file mode 100644
index 0000000..9762537
Binary files /dev/null and b/exercises/24-http-and-rest/list-of-users-doc.png differ
diff --git a/exercises/24-http-and-rest/list-of-users-thunderclient.png b/exercises/24-http-and-rest/list-of-users-thunderclient.png
new file mode 100644
index 0000000..5ed3b12
Binary files /dev/null and b/exercises/24-http-and-rest/list-of-users-thunderclient.png differ
diff --git a/exercises/24-http-and-rest/list-of-users-ui.png b/exercises/24-http-and-rest/list-of-users-ui.png
new file mode 100644
index 0000000..8a23184
Binary files /dev/null and b/exercises/24-http-and-rest/list-of-users-ui.png differ
diff --git a/exercises/24-http-and-rest/thunder-client-vscode.png b/exercises/24-http-and-rest/thunder-client-vscode.png
new file mode 100644
index 0000000..f469af6
Binary files /dev/null and b/exercises/24-http-and-rest/thunder-client-vscode.png differ
diff --git a/exercises/25-axios/axios.css b/exercises/25-axios/axios.css
new file mode 100644
index 0000000..37454da
--- /dev/null
+++ b/exercises/25-axios/axios.css
@@ -0,0 +1,26 @@
+body {
+ font-family: "Syncopate", sans-serif;
+ padding: 1rem;
+ text-align: center;
+}
+.container {
+ max-width: 1200px;
+ margin: auto;
+}
+h1 {
+ font-family: "Amatic SC", sans-serif;
+ font-size: 100px;
+ padding: -20px;
+ margin: -40px;
+ color: #b0aac2;
+}
+h2 {
+ font-family: "Amatic SC", sans-serif;
+ font-size: 60px;
+}
+img {
+ display: inline-block;
+}
+.button {
+ font-weight: bold;
+}
diff --git a/exercises/25-axios/axios.html b/exercises/25-axios/axios.html
new file mode 100644
index 0000000..675630e
--- /dev/null
+++ b/exercises/25-axios/axios.html
@@ -0,0 +1,39 @@
+
+
+
+ EXERCISES Axios
+
+
+
+
+
+
+
+
+
Oshi the dog tribute page
+
+
The best dog in the land.
+
+
+
+
+
+ Purr jump eat the grass rip the couch scratched sunbathe, shed everywhere
+ rip the couch sleep in the sink fluffy fur catnip scratched.
+
+
+
+
+
diff --git a/exercises/25-axios/axios.js b/exercises/25-axios/axios.js
new file mode 100644
index 0000000..d2e056e
--- /dev/null
+++ b/exercises/25-axios/axios.js
@@ -0,0 +1,26 @@
+(function () {
+ /**
+ * As a user, I should be able to click on the a button to see random dog images.
+ * Please use axios in this example.
+ *
+ * You will be making an HTTP request to this API:
+ * https://dog.ceo/api/breeds/image/random
+ *
+ * You should expect this as a response:
+ * {
+ * "status": "success",
+ * "message": "https://images.dog.ceo/breeds/poodle-toy/n02113624_9550.jpg"
+ * }
+ */
+ /*
+ axios({
+ url: "https://dog.ceo/api/breeds/image/random",
+ method: "GET",
+ });
+ */
+ const button = document.querySelector("button");
+ button.addEventListener("click", (e) => {
+ const image = document.querySelector("#image");
+ image.src = "https://dog.ceo/api/breeds/image/random";
+ });
+})();
diff --git a/projects/final-project/FinalProject.md b/projects/final-project/FinalProject.md
new file mode 100644
index 0000000..d170b05
--- /dev/null
+++ b/projects/final-project/FinalProject.md
@@ -0,0 +1,267 @@
+# Final Project - the Document Object Model (DOM)
+
+**Due Date: January 9, 2023 11:59pm**
+
+For your final project, you will be developing a front-end web based user interface in Vanilla JavaScript. You you have a choice of creating:
+
+1. A game of "Rock, Paper, Scissors"
+2. A calculator
+3. A game of "Tic-Tac-Toe"
+
+## Project Goals
+
+- To put together and make practical use of what was taught in class.
+- To learn about developer practices, like setting up a new website, maintaining your own git repository and writing a _README.md_.
+- To build a portfolio piece to show off to potential employers.
+
+This project will put together these topics that were covered in class:
+
+- Fundamentals of JavaScript
+- Working with the Document Object Model (DOM)
+- Handling events
+- Structuring your project
+
+## Projects
+
+Please select one of the project ideas below.
+
+### Option 1: Rock, Paper, Scissors Requirements
+
+Create a web version of the game ["Rock", "Paper", "Scissors"](https://www.youtube.com/watch?v=ND4fd6yScBM). Your user will be playing against a computer AI.
+
+
+
+
+
+#### UI Requirements
+
+If you choose this project, you must meet the following UI requirements:
+
+- There should be at least two screens:
+ - In one screen, the user should select either rock, paper, or scissors (or something similar).
+ - In a following screen, reveal who has won the game.
+- You must write some code to select rock, paper, or scissors for the computer at random.
+- The user should be able to play again without refreshing the screen.
+
+Feel free to add to more features to the game.
+
+#### Coding Requirements
+
+Each project must also meet the following requirements:
+
+- You put your code in file(s) external to the HTML that are loaded with `
+
+
+
+
+