From 6361b74812b3b5bf76709e08918b2f4ee47cbaf6 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 16:02:34 -0800
Subject: [PATCH 001/123] Add files via upload
---
1.md | 14 +++++++++++
2.md | 68 +++++++++++++++++++++++++++++++++++++++++++++++++++++
3.md | 70 +++++++++++++++++++++++++++++++++++++++++++++++++++++++
4.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
4 files changed, 228 insertions(+)
create mode 100644 1.md
create mode 100644 2.md
create mode 100644 3.md
create mode 100644 4.md
diff --git a/1.md b/1.md
new file mode 100644
index 00000000..5743a20b
--- /dev/null
+++ b/1.md
@@ -0,0 +1,14 @@
+
+
+# What is JavaScript?
+
+JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
+
+JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
+
+
+
+The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
+
+
+
diff --git a/2.md b/2.md
new file mode 100644
index 00000000..6298f7ac
--- /dev/null
+++ b/2.md
@@ -0,0 +1,68 @@
+
+
+# How is JavaScript written?
+
+## Introduction to the Basics
+
+JS is written by inserting a "script" tag into the HTML webpage as shown here:
+
+
+
+
+
+
+
+The script tag can be placed in either the header tag or the body tag.
+
+Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
+
+**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
+
+
+
+
+
+
+
+
+We can also internally format the document.write() using headers. It would look like this:
+
+
+
+
+
+
+
+JavaScript takes two attributes, language and type, both of which are placed inside the starting script tag.
+
+
+
+You no longer need the type attribute because JS is the default scripting language for HTML.
+
+The unique part about JavaScript is that you can generate a webpage using only JavaScript.
+
+## External JS
+
+Scripts can be accessed through external files. JS files have the extensions .js.
+
+Let's access an external file.
+
+- First, open a text file and name it "test.js"
+
+- In the text file, write down alert("You did it!");
+
+Then, run this:
+
+
+
+
+
+External scripts should not contain the script tag.
+
diff --git a/3.md b/3.md
new file mode 100644
index 00000000..ceb54ada
--- /dev/null
+++ b/3.md
@@ -0,0 +1,70 @@
+
+
+# Using Variables in JS
+
+## Naming Variables
+
+Variables in programming are used to contain values. In the following script, we're going to print x.
+
+You can use two key words which both essentially function the same to create a variable. Either "var" or "let"
+
+
+
+
+
+Both would print "50."
+
+Just like most programming languages, the "=" doesn't strictly mean "equals to" but rather is the assignment operator.
+
+You can call the variable with just the variable name, which would "contain" value. We call the variable when we do `document.write(x)`
+
+In the above script, we have assigned x a value of 50. If we did the following script, what value would we get?
+
+
+
+Our output would be 30.
+
+This is because we "assign" x to be 50 and y to be 30. Then, we "assign" x the value of y, changing it to 30. Unlike math, variables are going to be changed often.
+
+In JS, the variables are case sensitive. This means that the following code will result in an error.
+
+
+
+## What can variables hold?
+
+Variables can hold the following:
+
+
+
+## Naming guidelines
+
+There is a guideline when setting JS variables:
+
+- the first character must be a letter, an underscore(_), or a dollar sign($). The rest of the characters can be letters, numbers, underscores and dollar signs.
+- numbers cannot be the first character
+- variables cannot include logical operators or keywords, for instance "x+y" cannot be a variable
+- names may not have spaces
+
+These are the reserved keywords:
+
+
+
+## Operators
+
+The following chart explains the functionality of each operator:
+
+
\ No newline at end of file
diff --git a/4.md b/4.md
new file mode 100644
index 00000000..3f02957a
--- /dev/null
+++ b/4.md
@@ -0,0 +1,76 @@
+
+
+# Conditionals
+
+Conditionals allow the computer to execute different scenarios using a very specific syntax.
+
+## If/Else Statements
+
+Let's examine the first one, the `if` and `else` conditional.
+
+
+
+The above block of code will print `I love cars!` because the condition that carage<5 is fulfilled.
+
+If carage was equal to or greater than 5 (carage>=5), the `else` statement would have been printed.
+
+What happens if we have more than one condition?
+
+Enter the "else if" condition
+
+## Else if
+
+The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
+
+
+
+Recall that `===` is what we use to equate. In this certain block of code, the script would print out `This one's alright` because it is the only condition which is true.
+
+## Switch
+
+The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
+
+
+
+We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
+
+Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
+
+When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
+
From 40e1b67b11b1e31b720f928df7f3f569ab265409 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 16:05:03 -0800
Subject: [PATCH 002/123] delete 1.md
---
1.md | 14 --------------
1 file changed, 14 deletions(-)
delete mode 100644 1.md
diff --git a/1.md b/1.md
deleted file mode 100644
index 5743a20b..00000000
--- a/1.md
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-# What is JavaScript?
-
-JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
-
-JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
-
-
-
-The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
-
-
-
From 821e9cac8a4cdacb933b99fb33bba06d611509f9 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 16:05:13 -0800
Subject: [PATCH 003/123] Delete 2.md
---
2.md | 68 ------------------------------------------------------------
1 file changed, 68 deletions(-)
delete mode 100644 2.md
diff --git a/2.md b/2.md
deleted file mode 100644
index 6298f7ac..00000000
--- a/2.md
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-# How is JavaScript written?
-
-## Introduction to the Basics
-
-JS is written by inserting a "script" tag into the HTML webpage as shown here:
-
-
-
-
-
-
-
-The script tag can be placed in either the header tag or the body tag.
-
-Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
-
-**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
-
-
-
-
-
-
-
-
-We can also internally format the document.write() using headers. It would look like this:
-
-
-
-
-
-
-
-JavaScript takes two attributes, language and type, both of which are placed inside the starting script tag.
-
-
-
-You no longer need the type attribute because JS is the default scripting language for HTML.
-
-The unique part about JavaScript is that you can generate a webpage using only JavaScript.
-
-## External JS
-
-Scripts can be accessed through external files. JS files have the extensions .js.
-
-Let's access an external file.
-
-- First, open a text file and name it "test.js"
-
-- In the text file, write down alert("You did it!");
-
-Then, run this:
-
-
-
-
-
-External scripts should not contain the script tag.
-
From 53c04aa3360b669c55db55a789c381bb4780205e Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 16:05:23 -0800
Subject: [PATCH 004/123] Delete 3.md
---
3.md | 70 ------------------------------------------------------------
1 file changed, 70 deletions(-)
delete mode 100644 3.md
diff --git a/3.md b/3.md
deleted file mode 100644
index ceb54ada..00000000
--- a/3.md
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-# Using Variables in JS
-
-## Naming Variables
-
-Variables in programming are used to contain values. In the following script, we're going to print x.
-
-You can use two key words which both essentially function the same to create a variable. Either "var" or "let"
-
-
-
-
-
-Both would print "50."
-
-Just like most programming languages, the "=" doesn't strictly mean "equals to" but rather is the assignment operator.
-
-You can call the variable with just the variable name, which would "contain" value. We call the variable when we do `document.write(x)`
-
-In the above script, we have assigned x a value of 50. If we did the following script, what value would we get?
-
-
-
-Our output would be 30.
-
-This is because we "assign" x to be 50 and y to be 30. Then, we "assign" x the value of y, changing it to 30. Unlike math, variables are going to be changed often.
-
-In JS, the variables are case sensitive. This means that the following code will result in an error.
-
-
-
-## What can variables hold?
-
-Variables can hold the following:
-
-
-
-## Naming guidelines
-
-There is a guideline when setting JS variables:
-
-- the first character must be a letter, an underscore(_), or a dollar sign($). The rest of the characters can be letters, numbers, underscores and dollar signs.
-- numbers cannot be the first character
-- variables cannot include logical operators or keywords, for instance "x+y" cannot be a variable
-- names may not have spaces
-
-These are the reserved keywords:
-
-
-
-## Operators
-
-The following chart explains the functionality of each operator:
-
-
\ No newline at end of file
From ab636408bdb5281f22235fbde8e0dd35aee02ace Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 16:05:31 -0800
Subject: [PATCH 005/123] Delete 4.md
---
4.md | 76 ------------------------------------------------------------
1 file changed, 76 deletions(-)
delete mode 100644 4.md
diff --git a/4.md b/4.md
deleted file mode 100644
index 3f02957a..00000000
--- a/4.md
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-# Conditionals
-
-Conditionals allow the computer to execute different scenarios using a very specific syntax.
-
-## If/Else Statements
-
-Let's examine the first one, the `if` and `else` conditional.
-
-
-
-The above block of code will print `I love cars!` because the condition that carage<5 is fulfilled.
-
-If carage was equal to or greater than 5 (carage>=5), the `else` statement would have been printed.
-
-What happens if we have more than one condition?
-
-Enter the "else if" condition
-
-## Else if
-
-The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
-
-
-
-Recall that `===` is what we use to equate. In this certain block of code, the script would print out `This one's alright` because it is the only condition which is true.
-
-## Switch
-
-The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
-
-
-
-We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
-
-Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
-
-When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
-
From 452294e74c65de604d02f892ea7549821810bf97 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 16:06:28 -0800
Subject: [PATCH 006/123] Add files via upload
---
JavaScript/1.md | 14 +++++++++
JavaScript/2.md | 68 +++++++++++++++++++++++++++++++++++++++++++
JavaScript/3.md | 70 +++++++++++++++++++++++++++++++++++++++++++++
JavaScript/4.md | 76 +++++++++++++++++++++++++++++++++++++++++++++++++
JavaScript/5.md | 6 ++++
5 files changed, 234 insertions(+)
create mode 100644 JavaScript/1.md
create mode 100644 JavaScript/2.md
create mode 100644 JavaScript/3.md
create mode 100644 JavaScript/4.md
create mode 100644 JavaScript/5.md
diff --git a/JavaScript/1.md b/JavaScript/1.md
new file mode 100644
index 00000000..5743a20b
--- /dev/null
+++ b/JavaScript/1.md
@@ -0,0 +1,14 @@
+
+
+# What is JavaScript?
+
+JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
+
+JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
+
+
+
+The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
+
+
+
diff --git a/JavaScript/2.md b/JavaScript/2.md
new file mode 100644
index 00000000..6298f7ac
--- /dev/null
+++ b/JavaScript/2.md
@@ -0,0 +1,68 @@
+
+
+# How is JavaScript written?
+
+## Introduction to the Basics
+
+JS is written by inserting a "script" tag into the HTML webpage as shown here:
+
+
+
+
+
+
+
+The script tag can be placed in either the header tag or the body tag.
+
+Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
+
+**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
+
+
+
+
+
+
+
+
+We can also internally format the document.write() using headers. It would look like this:
+
+
+
+
+
+
+
+JavaScript takes two attributes, language and type, both of which are placed inside the starting script tag.
+
+
+
+You no longer need the type attribute because JS is the default scripting language for HTML.
+
+The unique part about JavaScript is that you can generate a webpage using only JavaScript.
+
+## External JS
+
+Scripts can be accessed through external files. JS files have the extensions .js.
+
+Let's access an external file.
+
+- First, open a text file and name it "test.js"
+
+- In the text file, write down alert("You did it!");
+
+Then, run this:
+
+
+
+
+
+External scripts should not contain the script tag.
+
diff --git a/JavaScript/3.md b/JavaScript/3.md
new file mode 100644
index 00000000..ceb54ada
--- /dev/null
+++ b/JavaScript/3.md
@@ -0,0 +1,70 @@
+
+
+# Using Variables in JS
+
+## Naming Variables
+
+Variables in programming are used to contain values. In the following script, we're going to print x.
+
+You can use two key words which both essentially function the same to create a variable. Either "var" or "let"
+
+
+
+
+
+Both would print "50."
+
+Just like most programming languages, the "=" doesn't strictly mean "equals to" but rather is the assignment operator.
+
+You can call the variable with just the variable name, which would "contain" value. We call the variable when we do `document.write(x)`
+
+In the above script, we have assigned x a value of 50. If we did the following script, what value would we get?
+
+
+
+Our output would be 30.
+
+This is because we "assign" x to be 50 and y to be 30. Then, we "assign" x the value of y, changing it to 30. Unlike math, variables are going to be changed often.
+
+In JS, the variables are case sensitive. This means that the following code will result in an error.
+
+
+
+## What can variables hold?
+
+Variables can hold the following:
+
+
+
+## Naming guidelines
+
+There is a guideline when setting JS variables:
+
+- the first character must be a letter, an underscore(_), or a dollar sign($). The rest of the characters can be letters, numbers, underscores and dollar signs.
+- numbers cannot be the first character
+- variables cannot include logical operators or keywords, for instance "x+y" cannot be a variable
+- names may not have spaces
+
+These are the reserved keywords:
+
+
+
+## Operators
+
+The following chart explains the functionality of each operator:
+
+
\ No newline at end of file
diff --git a/JavaScript/4.md b/JavaScript/4.md
new file mode 100644
index 00000000..3f02957a
--- /dev/null
+++ b/JavaScript/4.md
@@ -0,0 +1,76 @@
+
+
+# Conditionals
+
+Conditionals allow the computer to execute different scenarios using a very specific syntax.
+
+## If/Else Statements
+
+Let's examine the first one, the `if` and `else` conditional.
+
+
+
+The above block of code will print `I love cars!` because the condition that carage<5 is fulfilled.
+
+If carage was equal to or greater than 5 (carage>=5), the `else` statement would have been printed.
+
+What happens if we have more than one condition?
+
+Enter the "else if" condition
+
+## Else if
+
+The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
+
+
+
+Recall that `===` is what we use to equate. In this certain block of code, the script would print out `This one's alright` because it is the only condition which is true.
+
+## Switch
+
+The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
+
+
+
+We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
+
+Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
+
+When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
+
diff --git a/JavaScript/5.md b/JavaScript/5.md
new file mode 100644
index 00000000..93805374
--- /dev/null
+++ b/JavaScript/5.md
@@ -0,0 +1,6 @@
+
+
+# Arrays
+
+JavaScript allows arrays, a simple way to store multiple values into one variable:
+
From 574e53ba2123435bdf117c8ff9685bb2059ddbd6 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 16:07:04 -0800
Subject: [PATCH 007/123] Delete 1.md
---
JavaScript/1.md | 14 --------------
1 file changed, 14 deletions(-)
delete mode 100644 JavaScript/1.md
diff --git a/JavaScript/1.md b/JavaScript/1.md
deleted file mode 100644
index 5743a20b..00000000
--- a/JavaScript/1.md
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-# What is JavaScript?
-
-JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
-
-JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
-
-
-
-The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
-
-
-
From 227516753d2bd94789789a9edb3d1990f7c78a80 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 16:07:12 -0800
Subject: [PATCH 008/123] Delete 2.md
---
JavaScript/2.md | 68 -------------------------------------------------
1 file changed, 68 deletions(-)
delete mode 100644 JavaScript/2.md
diff --git a/JavaScript/2.md b/JavaScript/2.md
deleted file mode 100644
index 6298f7ac..00000000
--- a/JavaScript/2.md
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-# How is JavaScript written?
-
-## Introduction to the Basics
-
-JS is written by inserting a "script" tag into the HTML webpage as shown here:
-
-
-
-
-
-
-
-The script tag can be placed in either the header tag or the body tag.
-
-Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
-
-**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
-
-
-
-
-
-
-
-
-We can also internally format the document.write() using headers. It would look like this:
-
-
-
-
-
-
-
-JavaScript takes two attributes, language and type, both of which are placed inside the starting script tag.
-
-
-
-You no longer need the type attribute because JS is the default scripting language for HTML.
-
-The unique part about JavaScript is that you can generate a webpage using only JavaScript.
-
-## External JS
-
-Scripts can be accessed through external files. JS files have the extensions .js.
-
-Let's access an external file.
-
-- First, open a text file and name it "test.js"
-
-- In the text file, write down alert("You did it!");
-
-Then, run this:
-
-
-
-
-
-External scripts should not contain the script tag.
-
From ac21372756b9c9791d0f10aa757fa1aac44e94bc Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 16:07:21 -0800
Subject: [PATCH 009/123] Delete 3.md
---
JavaScript/3.md | 70 -------------------------------------------------
1 file changed, 70 deletions(-)
delete mode 100644 JavaScript/3.md
diff --git a/JavaScript/3.md b/JavaScript/3.md
deleted file mode 100644
index ceb54ada..00000000
--- a/JavaScript/3.md
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-# Using Variables in JS
-
-## Naming Variables
-
-Variables in programming are used to contain values. In the following script, we're going to print x.
-
-You can use two key words which both essentially function the same to create a variable. Either "var" or "let"
-
-
-
-
-
-Both would print "50."
-
-Just like most programming languages, the "=" doesn't strictly mean "equals to" but rather is the assignment operator.
-
-You can call the variable with just the variable name, which would "contain" value. We call the variable when we do `document.write(x)`
-
-In the above script, we have assigned x a value of 50. If we did the following script, what value would we get?
-
-
-
-Our output would be 30.
-
-This is because we "assign" x to be 50 and y to be 30. Then, we "assign" x the value of y, changing it to 30. Unlike math, variables are going to be changed often.
-
-In JS, the variables are case sensitive. This means that the following code will result in an error.
-
-
-
-## What can variables hold?
-
-Variables can hold the following:
-
-
-
-## Naming guidelines
-
-There is a guideline when setting JS variables:
-
-- the first character must be a letter, an underscore(_), or a dollar sign($). The rest of the characters can be letters, numbers, underscores and dollar signs.
-- numbers cannot be the first character
-- variables cannot include logical operators or keywords, for instance "x+y" cannot be a variable
-- names may not have spaces
-
-These are the reserved keywords:
-
-
-
-## Operators
-
-The following chart explains the functionality of each operator:
-
-
\ No newline at end of file
From 586dee7b0e43c00e26b0d0c85ebfc4c1a006854e Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 16:07:31 -0800
Subject: [PATCH 010/123] Delete 4.md
---
JavaScript/4.md | 76 -------------------------------------------------
1 file changed, 76 deletions(-)
delete mode 100644 JavaScript/4.md
diff --git a/JavaScript/4.md b/JavaScript/4.md
deleted file mode 100644
index 3f02957a..00000000
--- a/JavaScript/4.md
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-# Conditionals
-
-Conditionals allow the computer to execute different scenarios using a very specific syntax.
-
-## If/Else Statements
-
-Let's examine the first one, the `if` and `else` conditional.
-
-
-
-The above block of code will print `I love cars!` because the condition that carage<5 is fulfilled.
-
-If carage was equal to or greater than 5 (carage>=5), the `else` statement would have been printed.
-
-What happens if we have more than one condition?
-
-Enter the "else if" condition
-
-## Else if
-
-The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
-
-
-
-Recall that `===` is what we use to equate. In this certain block of code, the script would print out `This one's alright` because it is the only condition which is true.
-
-## Switch
-
-The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
-
-
-
-We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
-
-Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
-
-When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
-
From 03b2500e8e7bad34f1541759a0931d915c0f8fc6 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 16:07:44 -0800
Subject: [PATCH 011/123] Delete 5.md
---
JavaScript/5.md | 6 ------
1 file changed, 6 deletions(-)
delete mode 100644 JavaScript/5.md
diff --git a/JavaScript/5.md b/JavaScript/5.md
deleted file mode 100644
index 93805374..00000000
--- a/JavaScript/5.md
+++ /dev/null
@@ -1,6 +0,0 @@
-
-
-# Arrays
-
-JavaScript allows arrays, a simple way to store multiple values into one variable:
-
From ba2c7d6ecaa3d2ba866ac03a72d6e68a1ff9ce97 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 16:19:00 -0800
Subject: [PATCH 012/123] Week 2 JS Basics
---
react_week2/1.md | 14 +++++++++
react_week2/2.md | 68 +++++++++++++++++++++++++++++++++++++++++++
react_week2/3.md | 70 ++++++++++++++++++++++++++++++++++++++++++++
react_week2/4.md | 76 ++++++++++++++++++++++++++++++++++++++++++++++++
react_week2/5.md | 38 ++++++++++++++++++++++++
5 files changed, 266 insertions(+)
create mode 100644 react_week2/1.md
create mode 100644 react_week2/2.md
create mode 100644 react_week2/3.md
create mode 100644 react_week2/4.md
create mode 100644 react_week2/5.md
diff --git a/react_week2/1.md b/react_week2/1.md
new file mode 100644
index 00000000..5743a20b
--- /dev/null
+++ b/react_week2/1.md
@@ -0,0 +1,14 @@
+
+
+# What is JavaScript?
+
+JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
+
+JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
+
+
+
+The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
+
+
+
diff --git a/react_week2/2.md b/react_week2/2.md
new file mode 100644
index 00000000..6298f7ac
--- /dev/null
+++ b/react_week2/2.md
@@ -0,0 +1,68 @@
+
+
+# How is JavaScript written?
+
+## Introduction to the Basics
+
+JS is written by inserting a "script" tag into the HTML webpage as shown here:
+
+
+
+
+
+
+
+The script tag can be placed in either the header tag or the body tag.
+
+Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
+
+**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
+
+
+
+
+
+
+
+
+We can also internally format the document.write() using headers. It would look like this:
+
+
+
+
+
+
+
+JavaScript takes two attributes, language and type, both of which are placed inside the starting script tag.
+
+
+
+You no longer need the type attribute because JS is the default scripting language for HTML.
+
+The unique part about JavaScript is that you can generate a webpage using only JavaScript.
+
+## External JS
+
+Scripts can be accessed through external files. JS files have the extensions .js.
+
+Let's access an external file.
+
+- First, open a text file and name it "test.js"
+
+- In the text file, write down alert("You did it!");
+
+Then, run this:
+
+
+
+
+
+External scripts should not contain the script tag.
+
diff --git a/react_week2/3.md b/react_week2/3.md
new file mode 100644
index 00000000..ceb54ada
--- /dev/null
+++ b/react_week2/3.md
@@ -0,0 +1,70 @@
+
+
+# Using Variables in JS
+
+## Naming Variables
+
+Variables in programming are used to contain values. In the following script, we're going to print x.
+
+You can use two key words which both essentially function the same to create a variable. Either "var" or "let"
+
+
+
+
+
+Both would print "50."
+
+Just like most programming languages, the "=" doesn't strictly mean "equals to" but rather is the assignment operator.
+
+You can call the variable with just the variable name, which would "contain" value. We call the variable when we do `document.write(x)`
+
+In the above script, we have assigned x a value of 50. If we did the following script, what value would we get?
+
+
+
+Our output would be 30.
+
+This is because we "assign" x to be 50 and y to be 30. Then, we "assign" x the value of y, changing it to 30. Unlike math, variables are going to be changed often.
+
+In JS, the variables are case sensitive. This means that the following code will result in an error.
+
+
+
+## What can variables hold?
+
+Variables can hold the following:
+
+
+
+## Naming guidelines
+
+There is a guideline when setting JS variables:
+
+- the first character must be a letter, an underscore(_), or a dollar sign($). The rest of the characters can be letters, numbers, underscores and dollar signs.
+- numbers cannot be the first character
+- variables cannot include logical operators or keywords, for instance "x+y" cannot be a variable
+- names may not have spaces
+
+These are the reserved keywords:
+
+
+
+## Operators
+
+The following chart explains the functionality of each operator:
+
+
\ No newline at end of file
diff --git a/react_week2/4.md b/react_week2/4.md
new file mode 100644
index 00000000..3f02957a
--- /dev/null
+++ b/react_week2/4.md
@@ -0,0 +1,76 @@
+
+
+# Conditionals
+
+Conditionals allow the computer to execute different scenarios using a very specific syntax.
+
+## If/Else Statements
+
+Let's examine the first one, the `if` and `else` conditional.
+
+
+
+The above block of code will print `I love cars!` because the condition that carage<5 is fulfilled.
+
+If carage was equal to or greater than 5 (carage>=5), the `else` statement would have been printed.
+
+What happens if we have more than one condition?
+
+Enter the "else if" condition
+
+## Else if
+
+The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
+
+
+
+Recall that `===` is what we use to equate. In this certain block of code, the script would print out `This one's alright` because it is the only condition which is true.
+
+## Switch
+
+The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
+
+
+
+We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
+
+Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
+
+When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
+
diff --git a/react_week2/5.md b/react_week2/5.md
new file mode 100644
index 00000000..a6d5a99a
--- /dev/null
+++ b/react_week2/5.md
@@ -0,0 +1,38 @@
+
+
+# Array Basics
+
+JavaScript allows arrays, a simple way to store multiple values into one variable.
+
+This is an example of an array:
+
+`var fruit = ["Mango", "Apple", "Banana"]`
+
+It functions as a list. The easiest way to create an array is
+
+`var array_name = [item1, item2, item3...]`
+
+JS has a keyword named `new` which creates and assigns values to it:
+
+`var fruit = new Array ("Mango", "Apple", Banana)`
+
+To access an item of an array, we reference the **index number**
+
+`var name = fruit[0]` will return the first item in the array, which is "Mango". In JS, indexing starts at "0", meaning that the first item is referenced as 0.
+
+What happens if we want to change an item in an array? We do this:
+
+`fruit[0]=Watermelon` This assigns the first item to the value "Watermelon"
+
+We can use different "methods" to perform a variety of functions. For instance, the following block will give us the length of the fruit array.
+
+`var x = fruit.length();`
+
+There are several other methods:
+
+
+
+
+
+
+
From 1a8404e571a6c4fb4998e4e7c6074c870b528f63 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 17:32:26 -0800
Subject: [PATCH 013/123] Delete 1.md
---
react_week2/1.md | 14 --------------
1 file changed, 14 deletions(-)
delete mode 100644 react_week2/1.md
diff --git a/react_week2/1.md b/react_week2/1.md
deleted file mode 100644
index 5743a20b..00000000
--- a/react_week2/1.md
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-# What is JavaScript?
-
-JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
-
-JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
-
-
-
-The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
-
-
-
From c4830e31268c87b36758c6f2b00c8a3630cd3c17 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 17:32:33 -0800
Subject: [PATCH 014/123] Delete 2.md
---
react_week2/2.md | 68 ------------------------------------------------
1 file changed, 68 deletions(-)
delete mode 100644 react_week2/2.md
diff --git a/react_week2/2.md b/react_week2/2.md
deleted file mode 100644
index 6298f7ac..00000000
--- a/react_week2/2.md
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-# How is JavaScript written?
-
-## Introduction to the Basics
-
-JS is written by inserting a "script" tag into the HTML webpage as shown here:
-
-
-
-
-
-
-
-The script tag can be placed in either the header tag or the body tag.
-
-Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
-
-**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
-
-
-
-
-
-
-
-
-We can also internally format the document.write() using headers. It would look like this:
-
-
-
-
-
-
-
-JavaScript takes two attributes, language and type, both of which are placed inside the starting script tag.
-
-
-
-You no longer need the type attribute because JS is the default scripting language for HTML.
-
-The unique part about JavaScript is that you can generate a webpage using only JavaScript.
-
-## External JS
-
-Scripts can be accessed through external files. JS files have the extensions .js.
-
-Let's access an external file.
-
-- First, open a text file and name it "test.js"
-
-- In the text file, write down alert("You did it!");
-
-Then, run this:
-
-
-
-
-
-External scripts should not contain the script tag.
-
From 208aa8eed53d9e67738f5ffd75e77166ce9bd858 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 17:32:40 -0800
Subject: [PATCH 015/123] Delete 3.md
---
react_week2/3.md | 70 ------------------------------------------------
1 file changed, 70 deletions(-)
delete mode 100644 react_week2/3.md
diff --git a/react_week2/3.md b/react_week2/3.md
deleted file mode 100644
index ceb54ada..00000000
--- a/react_week2/3.md
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-# Using Variables in JS
-
-## Naming Variables
-
-Variables in programming are used to contain values. In the following script, we're going to print x.
-
-You can use two key words which both essentially function the same to create a variable. Either "var" or "let"
-
-
-
-
-
-Both would print "50."
-
-Just like most programming languages, the "=" doesn't strictly mean "equals to" but rather is the assignment operator.
-
-You can call the variable with just the variable name, which would "contain" value. We call the variable when we do `document.write(x)`
-
-In the above script, we have assigned x a value of 50. If we did the following script, what value would we get?
-
-
-
-Our output would be 30.
-
-This is because we "assign" x to be 50 and y to be 30. Then, we "assign" x the value of y, changing it to 30. Unlike math, variables are going to be changed often.
-
-In JS, the variables are case sensitive. This means that the following code will result in an error.
-
-
-
-## What can variables hold?
-
-Variables can hold the following:
-
-
-
-## Naming guidelines
-
-There is a guideline when setting JS variables:
-
-- the first character must be a letter, an underscore(_), or a dollar sign($). The rest of the characters can be letters, numbers, underscores and dollar signs.
-- numbers cannot be the first character
-- variables cannot include logical operators or keywords, for instance "x+y" cannot be a variable
-- names may not have spaces
-
-These are the reserved keywords:
-
-
-
-## Operators
-
-The following chart explains the functionality of each operator:
-
-
\ No newline at end of file
From 1e817ef5d67e54a2c456a5d7fefc21f0416ef276 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 17:32:48 -0800
Subject: [PATCH 016/123] Delete 4.md
---
react_week2/4.md | 76 ------------------------------------------------
1 file changed, 76 deletions(-)
delete mode 100644 react_week2/4.md
diff --git a/react_week2/4.md b/react_week2/4.md
deleted file mode 100644
index 3f02957a..00000000
--- a/react_week2/4.md
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-# Conditionals
-
-Conditionals allow the computer to execute different scenarios using a very specific syntax.
-
-## If/Else Statements
-
-Let's examine the first one, the `if` and `else` conditional.
-
-
-
-The above block of code will print `I love cars!` because the condition that carage<5 is fulfilled.
-
-If carage was equal to or greater than 5 (carage>=5), the `else` statement would have been printed.
-
-What happens if we have more than one condition?
-
-Enter the "else if" condition
-
-## Else if
-
-The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
-
-
-
-Recall that `===` is what we use to equate. In this certain block of code, the script would print out `This one's alright` because it is the only condition which is true.
-
-## Switch
-
-The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
-
-
-
-We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
-
-Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
-
-When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
-
From 251fe8aebe31f836b8b2c6a44a74da07edc03771 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 17:32:56 -0800
Subject: [PATCH 017/123] Delete 5.md
---
react_week2/5.md | 38 --------------------------------------
1 file changed, 38 deletions(-)
delete mode 100644 react_week2/5.md
diff --git a/react_week2/5.md b/react_week2/5.md
deleted file mode 100644
index a6d5a99a..00000000
--- a/react_week2/5.md
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-# Array Basics
-
-JavaScript allows arrays, a simple way to store multiple values into one variable.
-
-This is an example of an array:
-
-`var fruit = ["Mango", "Apple", "Banana"]`
-
-It functions as a list. The easiest way to create an array is
-
-`var array_name = [item1, item2, item3...]`
-
-JS has a keyword named `new` which creates and assigns values to it:
-
-`var fruit = new Array ("Mango", "Apple", Banana)`
-
-To access an item of an array, we reference the **index number**
-
-`var name = fruit[0]` will return the first item in the array, which is "Mango". In JS, indexing starts at "0", meaning that the first item is referenced as 0.
-
-What happens if we want to change an item in an array? We do this:
-
-`fruit[0]=Watermelon` This assigns the first item to the value "Watermelon"
-
-We can use different "methods" to perform a variety of functions. For instance, the following block will give us the length of the fruit array.
-
-`var x = fruit.length();`
-
-There are several other methods:
-
-
-
-
-
-
-
From 4fea4aec3629f6a7088c1726e8c0ed7c534e232c Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 18 Feb 2020 18:41:48 -0800
Subject: [PATCH 018/123] the react week 2 c
---
react_week2/1.md | 14 +++++++
react_week2/10.md | 5 +++
react_week2/2.md | 68 ++++++++++++++++++++++++++++++++
react_week2/3.md | 70 +++++++++++++++++++++++++++++++++
react_week2/4.md | 76 ++++++++++++++++++++++++++++++++++++
react_week2/5.md | 38 ++++++++++++++++++
react_week2/6.md | 99 +++++++++++++++++++++++++++++++++++++++++++++++
react_week2/7.md | 26 +++++++++++++
react_week2/8.md | 27 +++++++++++++
react_week2/9.md | 34 ++++++++++++++++
10 files changed, 457 insertions(+)
create mode 100644 react_week2/1.md
create mode 100644 react_week2/10.md
create mode 100644 react_week2/2.md
create mode 100644 react_week2/3.md
create mode 100644 react_week2/4.md
create mode 100644 react_week2/5.md
create mode 100644 react_week2/6.md
create mode 100644 react_week2/7.md
create mode 100644 react_week2/8.md
create mode 100644 react_week2/9.md
diff --git a/react_week2/1.md b/react_week2/1.md
new file mode 100644
index 00000000..5743a20b
--- /dev/null
+++ b/react_week2/1.md
@@ -0,0 +1,14 @@
+
+
+# What is JavaScript?
+
+JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
+
+JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
+
+
+
+The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
+
+
+
diff --git a/react_week2/10.md b/react_week2/10.md
new file mode 100644
index 00000000..b781b48c
--- /dev/null
+++ b/react_week2/10.md
@@ -0,0 +1,5 @@
+
+
+# Objects in JS
+
+Objects in JS
\ No newline at end of file
diff --git a/react_week2/2.md b/react_week2/2.md
new file mode 100644
index 00000000..32748124
--- /dev/null
+++ b/react_week2/2.md
@@ -0,0 +1,68 @@
+
+
+# How is JavaScript written?
+
+## Introduction to the Basics
+
+JS is written by inserting a "script" tag into the HTML webpage as shown here:
+
+
+
+
+
+
+
+The script tag can be placed in either the header tag or the body tag.
+
+Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
+
+**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
+
+
+
+
+
+
+
+
+We can also internally format the document.write() using headers. It would look like this:
+
+
+
+
+
+
+
+JavaScript takes two attributes, language and type, both of which are placed inside the starting script tag.
+
+
+
+You no longer need the type attribute because JS is the default scripting language for HTML.
+
+The unique part about JavaScript is that you can generate a webpage using only JavaScript.
+
+## External JS
+
+Scripts can be accessed through external files. JS files have the extensions .js.
+
+Let's access an external file.
+
+- First, open a text file and name it "test.js"
+
+- In the text file, write down `alert("You did it!");`
+
+Then, run this:
+
+
+
+
+
+External scripts should not contain the script tag.
+
diff --git a/react_week2/3.md b/react_week2/3.md
new file mode 100644
index 00000000..a1cb4ff6
--- /dev/null
+++ b/react_week2/3.md
@@ -0,0 +1,70 @@
+
+
+# Using Variables in JS
+
+## Naming Variables
+
+Variables in programming are used to contain values. In the following script, we're going to print x.
+
+You can use two key words which both essentially function the same to create a variable. Either `var` or `let`
+
+
+
+
+
+Both would print "50."
+
+Just like most programming languages, the "=" doesn't strictly mean "equals to" but rather is the assignment operator.
+
+You can call the variable with just the variable name, which would "contain" value. We call the variable when we do `document.write(x)`
+
+In the above script, we have assigned x a value of 50. If we did the following script, what value would we get?
+
+
+
+Our output would be 30.
+
+This is because we "assign" x to be 50 and y to be 30. Then, we "assign" x the value of y, changing it to 30. Unlike math, variables are going to be changed often.
+
+In JS, the variables are case sensitive. This means that the following code will result in an error.
+
+
+
+## What can variables hold?
+
+Variables can hold the following:
+
+
+
+## Naming guidelines
+
+There is a guideline when setting JS variables:
+
+- the first character must be a letter, an underscore(_), or a dollar sign($). The rest of the characters can be letters, numbers, underscores and dollar signs.
+- numbers cannot be the first character
+- variables cannot include logical operators or keywords, for instance "x+y" cannot be a variable
+- names may not have spaces
+
+These are the reserved keywords:
+
+
+
+## Operators
+
+The following chart explains the functionality of each operator:
+
+
\ No newline at end of file
diff --git a/react_week2/4.md b/react_week2/4.md
new file mode 100644
index 00000000..3f02957a
--- /dev/null
+++ b/react_week2/4.md
@@ -0,0 +1,76 @@
+
+
+# Conditionals
+
+Conditionals allow the computer to execute different scenarios using a very specific syntax.
+
+## If/Else Statements
+
+Let's examine the first one, the `if` and `else` conditional.
+
+
+
+The above block of code will print `I love cars!` because the condition that carage<5 is fulfilled.
+
+If carage was equal to or greater than 5 (carage>=5), the `else` statement would have been printed.
+
+What happens if we have more than one condition?
+
+Enter the "else if" condition
+
+## Else if
+
+The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
+
+
+
+Recall that `===` is what we use to equate. In this certain block of code, the script would print out `This one's alright` because it is the only condition which is true.
+
+## Switch
+
+The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
+
+
+
+We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
+
+Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
+
+When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
+
diff --git a/react_week2/5.md b/react_week2/5.md
new file mode 100644
index 00000000..a6d5a99a
--- /dev/null
+++ b/react_week2/5.md
@@ -0,0 +1,38 @@
+
+
+# Array Basics
+
+JavaScript allows arrays, a simple way to store multiple values into one variable.
+
+This is an example of an array:
+
+`var fruit = ["Mango", "Apple", "Banana"]`
+
+It functions as a list. The easiest way to create an array is
+
+`var array_name = [item1, item2, item3...]`
+
+JS has a keyword named `new` which creates and assigns values to it:
+
+`var fruit = new Array ("Mango", "Apple", Banana)`
+
+To access an item of an array, we reference the **index number**
+
+`var name = fruit[0]` will return the first item in the array, which is "Mango". In JS, indexing starts at "0", meaning that the first item is referenced as 0.
+
+What happens if we want to change an item in an array? We do this:
+
+`fruit[0]=Watermelon` This assigns the first item to the value "Watermelon"
+
+We can use different "methods" to perform a variety of functions. For instance, the following block will give us the length of the fruit array.
+
+`var x = fruit.length();`
+
+There are several other methods:
+
+
+
+
+
+
+
diff --git a/react_week2/6.md b/react_week2/6.md
new file mode 100644
index 00000000..60362ef1
--- /dev/null
+++ b/react_week2/6.md
@@ -0,0 +1,99 @@
+
+
+# Loops
+
+There are two main kinds of loops: for and while loops. Both of these are consistent in every type of programming language. JS also supports other types of loops
+
+## For Loops
+
+For loops iterate a certain amount of times, often dictated by the amount of items in an array. Let's look at an example and dissect it from there:
+
+
+
+This script will iterate 5 times and will print this: `Apple, Banana, Orange, Melon, Peach, Plum`
+
+Recall that arrays start indexing their first item as fruit[0]. This means that fruit[5] becomes Plum. Hence, we can print all of the array.
+
+The general format of the for loop is as follows:
+
+`for (x,y,z){`
+
+`code to be executed`
+
+`}`
+
+where x is executed once before the code block, y defines the condition to the execution of the code block, and z executes after the code block has been executed.
+
+## While Loops
+
+While loops iterate through the loop for as long as the condition is true. Let's look at an example:
+
+
+
+This loop iterates 0-9 times, so our result will look like this:
+
+`The number is 0
+The number is 1` and so forth. The while loop iterated until i became 10, and then stopped iterating. The `i++` function adds 1 to i and increments it. `i--` would decrement the code.
+
+The general format of the while loop is as follows:
+
+`while (condition) {`
+
+`code to be executed`
+
+`}`
+
+
+
+## Break
+
+Break statements forces the loop to stop iterating and forces the code onto the next line of text. Here's what a break statement would look like:
+
+
+
+Instead of printing all nine numbers, the code will print this:
+
+`The number is 0
+The number is 1
+The number is 2`
+
+Because it will `break` when `i===3` and will skip past any of the remaining code.
+
+## Continue
+
+Continue values are like the "opposite" of breaks. Instead of breaking out of the loop, they reiterate the function:
+
+
+
+The result will skip over 3 until it reaches the end of the loop and then it will contunue to the next code block.
+
diff --git a/react_week2/7.md b/react_week2/7.md
new file mode 100644
index 00000000..347f276a
--- /dev/null
+++ b/react_week2/7.md
@@ -0,0 +1,26 @@
+
+
+# Functions
+
+A function in JavaScript is a block of code which is designed to do something. When the function is invoked, the code performs a certain task. In the example below, we want to multiply two numbers.
+
+
+
+The result will be 12.
+
+When the code hits the `return`, the code will stop executing.
+
+The general format for a function is as follows:
+
+`function name(parameter1, parameter2, parameter3...){`
+
+`code to be executed`
+
+}
+
+Functions are usefull because they can be defined according to our needs and can be used however we see fit.
\ No newline at end of file
diff --git a/react_week2/8.md b/react_week2/8.md
new file mode 100644
index 00000000..de74f506
--- /dev/null
+++ b/react_week2/8.md
@@ -0,0 +1,27 @@
+
+
+# Events
+
+Events allow the user to interact with the webpage and is what sets JavaScript apart from other languages.
+
+
+
+The `querySelector` selects the `` element, setting onclick to a nameless function, which are also called anonymous functions, and generating the alert.
+
+Let's generate another event, one that tells us the date and time:
+
+
+When run, this little bit of code will allow us to generate the time that it currently is using JavaScript. Of course, we're going to need someway to generate the date and time, and for that we would use the button function in HTML. That's going to be your challenge activity.
+
+Here's a common list of events:
+
+
+
diff --git a/react_week2/9.md b/react_week2/9.md
new file mode 100644
index 00000000..aa239c20
--- /dev/null
+++ b/react_week2/9.md
@@ -0,0 +1,34 @@
+
+
+# Arrow Functions
+
+ES6 introduced "Arrow Functions", which make using functions easier.
+
+Here's the "Hello World!" as how we did it earlier
+
+
+
+And here's "Hello World!" using a function
+
+
+
+And here's "Hello World" using an Arrow Function
+
+
+
+Notice that the function got shorter! If the function has one value and has a return function, we can omit the `function` and `return` statement all together.
+
+This provides compactness and clarity to the code.
+
+
+
+
+
From 932cdd086dadd7dfe4374b3244bf52183f5a8846 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Sat, 22 Feb 2020 03:03:51 -0800
Subject: [PATCH 019/123] Delete 1.md
---
react_week2/1.md | 14 --------------
1 file changed, 14 deletions(-)
delete mode 100644 react_week2/1.md
diff --git a/react_week2/1.md b/react_week2/1.md
deleted file mode 100644
index 5743a20b..00000000
--- a/react_week2/1.md
+++ /dev/null
@@ -1,14 +0,0 @@
-
-
-# What is JavaScript?
-
-JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
-
-JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
-
-
-
-The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
-
-
-
From 9c8888975dbf05a4bf3d7f30fa141e99efee55f6 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Sat, 22 Feb 2020 03:04:00 -0800
Subject: [PATCH 020/123] Delete 10.md
---
react_week2/10.md | 5 -----
1 file changed, 5 deletions(-)
delete mode 100644 react_week2/10.md
diff --git a/react_week2/10.md b/react_week2/10.md
deleted file mode 100644
index b781b48c..00000000
--- a/react_week2/10.md
+++ /dev/null
@@ -1,5 +0,0 @@
-
-
-# Objects in JS
-
-Objects in JS
\ No newline at end of file
From 1d135c612bf5b985797c4a84834fb903b8b8d0cf Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Sat, 22 Feb 2020 03:04:21 -0800
Subject: [PATCH 021/123] Delete 2.md
---
react_week2/2.md | 68 ------------------------------------------------
1 file changed, 68 deletions(-)
delete mode 100644 react_week2/2.md
diff --git a/react_week2/2.md b/react_week2/2.md
deleted file mode 100644
index 32748124..00000000
--- a/react_week2/2.md
+++ /dev/null
@@ -1,68 +0,0 @@
-
-
-# How is JavaScript written?
-
-## Introduction to the Basics
-
-JS is written by inserting a "script" tag into the HTML webpage as shown here:
-
-
-
-
-
-
-
-The script tag can be placed in either the header tag or the body tag.
-
-Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
-
-**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
-
-
-
-
-
-
-
-
-We can also internally format the document.write() using headers. It would look like this:
-
-
-
-
-
-
-
-JavaScript takes two attributes, language and type, both of which are placed inside the starting script tag.
-
-
-
-You no longer need the type attribute because JS is the default scripting language for HTML.
-
-The unique part about JavaScript is that you can generate a webpage using only JavaScript.
-
-## External JS
-
-Scripts can be accessed through external files. JS files have the extensions .js.
-
-Let's access an external file.
-
-- First, open a text file and name it "test.js"
-
-- In the text file, write down `alert("You did it!");`
-
-Then, run this:
-
-
-
-
-
-External scripts should not contain the script tag.
-
From 8de65c8a608c375971c4c8d353fa83ca21e61a63 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Sat, 22 Feb 2020 03:04:38 -0800
Subject: [PATCH 022/123] Delete 3.md
---
react_week2/3.md | 70 ------------------------------------------------
1 file changed, 70 deletions(-)
delete mode 100644 react_week2/3.md
diff --git a/react_week2/3.md b/react_week2/3.md
deleted file mode 100644
index a1cb4ff6..00000000
--- a/react_week2/3.md
+++ /dev/null
@@ -1,70 +0,0 @@
-
-
-# Using Variables in JS
-
-## Naming Variables
-
-Variables in programming are used to contain values. In the following script, we're going to print x.
-
-You can use two key words which both essentially function the same to create a variable. Either `var` or `let`
-
-
-
-
-
-Both would print "50."
-
-Just like most programming languages, the "=" doesn't strictly mean "equals to" but rather is the assignment operator.
-
-You can call the variable with just the variable name, which would "contain" value. We call the variable when we do `document.write(x)`
-
-In the above script, we have assigned x a value of 50. If we did the following script, what value would we get?
-
-
-
-Our output would be 30.
-
-This is because we "assign" x to be 50 and y to be 30. Then, we "assign" x the value of y, changing it to 30. Unlike math, variables are going to be changed often.
-
-In JS, the variables are case sensitive. This means that the following code will result in an error.
-
-
-
-## What can variables hold?
-
-Variables can hold the following:
-
-
-
-## Naming guidelines
-
-There is a guideline when setting JS variables:
-
-- the first character must be a letter, an underscore(_), or a dollar sign($). The rest of the characters can be letters, numbers, underscores and dollar signs.
-- numbers cannot be the first character
-- variables cannot include logical operators or keywords, for instance "x+y" cannot be a variable
-- names may not have spaces
-
-These are the reserved keywords:
-
-
-
-## Operators
-
-The following chart explains the functionality of each operator:
-
-
\ No newline at end of file
From 9ca5203f32093887598fca9508df41c6ffc277c4 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Sat, 22 Feb 2020 03:04:47 -0800
Subject: [PATCH 023/123] Delete 4.md
---
react_week2/4.md | 76 ------------------------------------------------
1 file changed, 76 deletions(-)
delete mode 100644 react_week2/4.md
diff --git a/react_week2/4.md b/react_week2/4.md
deleted file mode 100644
index 3f02957a..00000000
--- a/react_week2/4.md
+++ /dev/null
@@ -1,76 +0,0 @@
-
-
-# Conditionals
-
-Conditionals allow the computer to execute different scenarios using a very specific syntax.
-
-## If/Else Statements
-
-Let's examine the first one, the `if` and `else` conditional.
-
-
-
-The above block of code will print `I love cars!` because the condition that carage<5 is fulfilled.
-
-If carage was equal to or greater than 5 (carage>=5), the `else` statement would have been printed.
-
-What happens if we have more than one condition?
-
-Enter the "else if" condition
-
-## Else if
-
-The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
-
-
-
-Recall that `===` is what we use to equate. In this certain block of code, the script would print out `This one's alright` because it is the only condition which is true.
-
-## Switch
-
-The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
-
-
-
-We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
-
-Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
-
-When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
-
From 678609da0139e856241cf5667ffd5bd657a4854b Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Sat, 22 Feb 2020 03:05:00 -0800
Subject: [PATCH 024/123] Delete 5.md
---
react_week2/5.md | 38 --------------------------------------
1 file changed, 38 deletions(-)
delete mode 100644 react_week2/5.md
diff --git a/react_week2/5.md b/react_week2/5.md
deleted file mode 100644
index a6d5a99a..00000000
--- a/react_week2/5.md
+++ /dev/null
@@ -1,38 +0,0 @@
-
-
-# Array Basics
-
-JavaScript allows arrays, a simple way to store multiple values into one variable.
-
-This is an example of an array:
-
-`var fruit = ["Mango", "Apple", "Banana"]`
-
-It functions as a list. The easiest way to create an array is
-
-`var array_name = [item1, item2, item3...]`
-
-JS has a keyword named `new` which creates and assigns values to it:
-
-`var fruit = new Array ("Mango", "Apple", Banana)`
-
-To access an item of an array, we reference the **index number**
-
-`var name = fruit[0]` will return the first item in the array, which is "Mango". In JS, indexing starts at "0", meaning that the first item is referenced as 0.
-
-What happens if we want to change an item in an array? We do this:
-
-`fruit[0]=Watermelon` This assigns the first item to the value "Watermelon"
-
-We can use different "methods" to perform a variety of functions. For instance, the following block will give us the length of the fruit array.
-
-`var x = fruit.length();`
-
-There are several other methods:
-
-
-
-
-
-
-
From e0273d6c3fd33d633342f46692ed506de964c74b Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Sat, 22 Feb 2020 03:05:11 -0800
Subject: [PATCH 025/123] Delete 6.md
---
react_week2/6.md | 99 ------------------------------------------------
1 file changed, 99 deletions(-)
delete mode 100644 react_week2/6.md
diff --git a/react_week2/6.md b/react_week2/6.md
deleted file mode 100644
index 60362ef1..00000000
--- a/react_week2/6.md
+++ /dev/null
@@ -1,99 +0,0 @@
-
-
-# Loops
-
-There are two main kinds of loops: for and while loops. Both of these are consistent in every type of programming language. JS also supports other types of loops
-
-## For Loops
-
-For loops iterate a certain amount of times, often dictated by the amount of items in an array. Let's look at an example and dissect it from there:
-
-
-
-This script will iterate 5 times and will print this: `Apple, Banana, Orange, Melon, Peach, Plum`
-
-Recall that arrays start indexing their first item as fruit[0]. This means that fruit[5] becomes Plum. Hence, we can print all of the array.
-
-The general format of the for loop is as follows:
-
-`for (x,y,z){`
-
-`code to be executed`
-
-`}`
-
-where x is executed once before the code block, y defines the condition to the execution of the code block, and z executes after the code block has been executed.
-
-## While Loops
-
-While loops iterate through the loop for as long as the condition is true. Let's look at an example:
-
-
-
-This loop iterates 0-9 times, so our result will look like this:
-
-`The number is 0
-The number is 1` and so forth. The while loop iterated until i became 10, and then stopped iterating. The `i++` function adds 1 to i and increments it. `i--` would decrement the code.
-
-The general format of the while loop is as follows:
-
-`while (condition) {`
-
-`code to be executed`
-
-`}`
-
-
-
-## Break
-
-Break statements forces the loop to stop iterating and forces the code onto the next line of text. Here's what a break statement would look like:
-
-
-
-Instead of printing all nine numbers, the code will print this:
-
-`The number is 0
-The number is 1
-The number is 2`
-
-Because it will `break` when `i===3` and will skip past any of the remaining code.
-
-## Continue
-
-Continue values are like the "opposite" of breaks. Instead of breaking out of the loop, they reiterate the function:
-
-
-
-The result will skip over 3 until it reaches the end of the loop and then it will contunue to the next code block.
-
From 1e42fd1af1f1eeece49d774b52970acdaf64e1cd Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Sat, 22 Feb 2020 03:05:19 -0800
Subject: [PATCH 026/123] Delete 7.md
---
react_week2/7.md | 26 --------------------------
1 file changed, 26 deletions(-)
delete mode 100644 react_week2/7.md
diff --git a/react_week2/7.md b/react_week2/7.md
deleted file mode 100644
index 347f276a..00000000
--- a/react_week2/7.md
+++ /dev/null
@@ -1,26 +0,0 @@
-
-
-# Functions
-
-A function in JavaScript is a block of code which is designed to do something. When the function is invoked, the code performs a certain task. In the example below, we want to multiply two numbers.
-
-
-
-The result will be 12.
-
-When the code hits the `return`, the code will stop executing.
-
-The general format for a function is as follows:
-
-`function name(parameter1, parameter2, parameter3...){`
-
-`code to be executed`
-
-}
-
-Functions are usefull because they can be defined according to our needs and can be used however we see fit.
\ No newline at end of file
From fd002ac685ab68ec62c6351443cf4792009db411 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Sat, 22 Feb 2020 03:05:26 -0800
Subject: [PATCH 027/123] Delete 8.md
---
react_week2/8.md | 27 ---------------------------
1 file changed, 27 deletions(-)
delete mode 100644 react_week2/8.md
diff --git a/react_week2/8.md b/react_week2/8.md
deleted file mode 100644
index de74f506..00000000
--- a/react_week2/8.md
+++ /dev/null
@@ -1,27 +0,0 @@
-
-
-# Events
-
-Events allow the user to interact with the webpage and is what sets JavaScript apart from other languages.
-
-
-
-The `querySelector` selects the `` element, setting onclick to a nameless function, which are also called anonymous functions, and generating the alert.
-
-Let's generate another event, one that tells us the date and time:
-
-
-When run, this little bit of code will allow us to generate the time that it currently is using JavaScript. Of course, we're going to need someway to generate the date and time, and for that we would use the button function in HTML. That's going to be your challenge activity.
-
-Here's a common list of events:
-
-
-
From 16200057db91110874072dd65f4ebc3f42e78780 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Sat, 22 Feb 2020 03:05:34 -0800
Subject: [PATCH 028/123] Delete 9.md
---
react_week2/9.md | 34 ----------------------------------
1 file changed, 34 deletions(-)
delete mode 100644 react_week2/9.md
diff --git a/react_week2/9.md b/react_week2/9.md
deleted file mode 100644
index aa239c20..00000000
--- a/react_week2/9.md
+++ /dev/null
@@ -1,34 +0,0 @@
-
-
-# Arrow Functions
-
-ES6 introduced "Arrow Functions", which make using functions easier.
-
-Here's the "Hello World!" as how we did it earlier
-
-
-
-And here's "Hello World!" using a function
-
-
-
-And here's "Hello World" using an Arrow Function
-
-
-
-Notice that the function got shorter! If the function has one value and has a return function, we can omit the `function` and `return` statement all together.
-
-This provides compactness and clarity to the code.
-
-
-
-
-
From 99dd9c0bc84fb6fa3d4ef396ca9c3963d82921d6 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Sat, 22 Feb 2020 03:06:42 -0800
Subject: [PATCH 029/123] Add files via upload
---
react_week2_fixed/1.md | 16 +++++++++++++++
react_week2_fixed/10.md | 17 ++++++++++++++++
react_week2_fixed/11.md | 25 ++++++++++++++++++++++++
react_week2_fixed/12.md | 33 +++++++++++++++++++++++++++++++
react_week2_fixed/13.md | 40 ++++++++++++++++++++++++++++++++++++++
react_week2_fixed/14.md | 35 +++++++++++++++++++++++++++++++++
react_week2_fixed/15.md | 26 +++++++++++++++++++++++++
react_week2_fixed/16.md | 32 ++++++++++++++++++++++++++++++
react_week2_fixed/17.md | 22 +++++++++++++++++++++
react_week2_fixed/18.md | 34 ++++++++++++++++++++++++++++++++
react_week2_fixed/19.md | 38 ++++++++++++++++++++++++++++++++++++
react_week2_fixed/2.md | 43 +++++++++++++++++++++++++++++++++++++++++
react_week2_fixed/20.md | 5 +++++
react_week2_fixed/3.md | 18 +++++++++++++++++
react_week2_fixed/4.md | 24 +++++++++++++++++++++++
react_week2_fixed/5.md | 23 ++++++++++++++++++++++
react_week2_fixed/6.md | 24 +++++++++++++++++++++++
react_week2_fixed/7.md | 25 ++++++++++++++++++++++++
react_week2_fixed/8.md | 27 ++++++++++++++++++++++++++
react_week2_fixed/9.md | 22 +++++++++++++++++++++
20 files changed, 529 insertions(+)
create mode 100644 react_week2_fixed/1.md
create mode 100644 react_week2_fixed/10.md
create mode 100644 react_week2_fixed/11.md
create mode 100644 react_week2_fixed/12.md
create mode 100644 react_week2_fixed/13.md
create mode 100644 react_week2_fixed/14.md
create mode 100644 react_week2_fixed/15.md
create mode 100644 react_week2_fixed/16.md
create mode 100644 react_week2_fixed/17.md
create mode 100644 react_week2_fixed/18.md
create mode 100644 react_week2_fixed/19.md
create mode 100644 react_week2_fixed/2.md
create mode 100644 react_week2_fixed/20.md
create mode 100644 react_week2_fixed/3.md
create mode 100644 react_week2_fixed/4.md
create mode 100644 react_week2_fixed/5.md
create mode 100644 react_week2_fixed/6.md
create mode 100644 react_week2_fixed/7.md
create mode 100644 react_week2_fixed/8.md
create mode 100644 react_week2_fixed/9.md
diff --git a/react_week2_fixed/1.md b/react_week2_fixed/1.md
new file mode 100644
index 00000000..ee4c11e7
--- /dev/null
+++ b/react_week2_fixed/1.md
@@ -0,0 +1,16 @@
+
+
+# What is JavaScript?
+
+JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
+
+JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
+
+
+
+The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
+
+For instance, the tag goes at the top, and th
+
+
+
diff --git a/react_week2_fixed/10.md b/react_week2_fixed/10.md
new file mode 100644
index 00000000..75b48215
--- /dev/null
+++ b/react_week2_fixed/10.md
@@ -0,0 +1,17 @@
+## Continue
+
+Continue values are like the "opposite" of breaks. Instead of breaking out of the loop, they reiterate the function:
+
+``` javascript
+ let text = "";
+ let i;
+ for (i = 0; i < 10; i++) {
+ if (i === 3) { continue; }
+ text += "The number is " + i + " ";
+}
+document.write(text)
+```
+
+
+The result will skip over 3 until it reaches the end of the loop and then it will contunue to the next code block.
+
diff --git a/react_week2_fixed/11.md b/react_week2_fixed/11.md
new file mode 100644
index 00000000..aa8113f3
--- /dev/null
+++ b/react_week2_fixed/11.md
@@ -0,0 +1,25 @@
+## Functions
+
+A function in JavaScript is a block of code which is designed to do something. When the function is invoked, the code performs a certain task. In the example below, we want to multiply two numbers.
+
+``` javascript
+ let x = myFunction(4, 3);
+function myFunction(a, b) {
+ return a * b;
+}
+```
+
+
+The result will be 12.
+
+When the code hits the `return`, the code will stop executing.
+
+The general format for a function is as follows:
+
+`function name(parameter1, parameter2, parameter3...){`
+
+`code to be executed`
+
+}
+
+Functions are usefull because they can be defined according to our needs and can be used however we see fit.
\ No newline at end of file
diff --git a/react_week2_fixed/12.md b/react_week2_fixed/12.md
new file mode 100644
index 00000000..d43066ce
--- /dev/null
+++ b/react_week2_fixed/12.md
@@ -0,0 +1,33 @@
+## Arrow Functions
+
+ES6 introduced "Arrow Functions", which make using functions easier.
+
+Here's the "Hello World!" as how we did it earlier
+
+``` JavaScript
+document.write("Hello World!");
+```
+
+And here's "Hello World!" using a function
+
+``` javascript
+ hello = function(){
+ return "Hello World!"
+ }
+```
+
+And here's "Hello World" using an Arrow Function
+
+``` JavaScript
+ hello = () => "Hello World!"
+```
+
+
+Notice that the function got shorter! If the function has one value and has a return function, we can omit the `function` and `return` statement all together.
+
+This provides compactness and clarity to the code.
+
+
+
+
+
diff --git a/react_week2_fixed/13.md b/react_week2_fixed/13.md
new file mode 100644
index 00000000..87e8bd15
--- /dev/null
+++ b/react_week2_fixed/13.md
@@ -0,0 +1,40 @@
+## Objects Basics
+
+Almost all objects in JavaScript are parts of the keyword `Object`. Objects are usually initialized with the `Object()` method.
+
+ Objects "inherit" their properties from other objects, often called "object prototypes." This inheritance based on linking prototypes together is known as the "prototype chain." Prototypes are defined by `Object.prototype`
+
+Objects can be thought of as a variable that holds many data types in **name:value** pairs. We can access the data stored in objects by calling the name.
+
+```JavaScript
+let person = {
+ firstName: "John",
+ lastName: "Doe",
+ fullName: () => this.firstName + " " + this.lastName
+ }
+};
+```
+
+We can call the properties in this object in two ways:
+
+```JavaScript
+object.name
+// or
+object['name']
+```
+
+We could call the first name of the `person` variable like this:
+
+```JavaScript
+let call = person.firstName;
+// or
+let call = person['firstName'];
+```
+
+We've been using objects and their methods this whole time!
+
+```JavaScript
+document.write("Hello World!")
+```
+
+The `write()` method is modifying the `document` object. Similarly,
\ No newline at end of file
diff --git a/react_week2_fixed/14.md b/react_week2_fixed/14.md
new file mode 100644
index 00000000..6f5881b2
--- /dev/null
+++ b/react_week2_fixed/14.md
@@ -0,0 +1,35 @@
+## Objects Advanced
+
+Now that we know how Objects look like in JavaScript, let's constuct our own objects.
+
+``` JavaScript
+let person = {
+ name: "John",
+ age: 10,
+ hometown: "davis"
+}
+```
+
+This method only allows you to create one object. If we want to create several objects, we will want to create an object type.
+
+```javascript
+function person(name, age, hometown){
+ this.name=name;
+ this.age=age;
+ this.hometown=hometown;;
+}
+// the keyword "this" is a reserved keyword which refers to the current object
+// "this" is not a variable and cannot be changed
+```
+
+This is an "object constructor", which takes parameters and allows the assignment to object properties. Now, if we want to create new object, we can use the `new` keyword
+
+```javascript
+function person(name, age, hometown){
+ this.name=name;
+ this.age=age;
+ this.hometown=hometown;
+}
+let John= new person("John",10,"davis")
+```
+
diff --git a/react_week2_fixed/15.md b/react_week2_fixed/15.md
new file mode 100644
index 00000000..b703d39c
--- /dev/null
+++ b/react_week2_fixed/15.md
@@ -0,0 +1,26 @@
+## Events
+
+Events allow the user to interact with the webpage and is what sets JavaScript apart from other languages.
+
+``` JavaScript
+ document.querySelector('html').onclick = function() {
+ alert('Now, this is interactivity!');
+```
+
+
+The `querySelector` selects the `` element, setting onclick to a nameless function, which are also called anonymous functions, and generating the alert.
+
+Let's generate another event, one that tells us the date and time:
+
+``` javascript
+function displayDate() {
+ document.getElementById("time").innerHTML = Date();
+}
+```
+
+When run, this little bit of code will allow us to generate the time that it currently is using JavaScript. Of course, we're going to need someway to generate the date and time, and for that we would use the button function in HTML. That's going to be your challenge activity.
+
+Here's a common list of events:
+
+
+
diff --git a/react_week2_fixed/16.md b/react_week2_fixed/16.md
new file mode 100644
index 00000000..fab24a9c
--- /dev/null
+++ b/react_week2_fixed/16.md
@@ -0,0 +1,32 @@
+## Arrays
+
+JavaScript allows arrays, a special type of object.
+
+This is an example of an array:
+
+`let fruit = ["Mango", "Apple", "Banana"]`
+
+It functions as a list. The easiest way to create an array is
+
+`let array_name = [item1, item2, item3...]`
+
+JS has a keyword named `new` which creates and assigns values to it:
+
+`let fruit = new Array ("Mango", "Apple", Banana)`
+
+To access an item of an array, we reference the **index number**
+
+`let name = fruit[0]` will return the first item in the array, which is "Mango". In JS, indexing starts at "0", meaning that the first item is referenced as 0.
+
+What happens if we want to change an item in an array? We do this:
+
+`fruit[0]=Watermelon` This assigns the first item to the value "Watermelon"
+
+We can use different methods to perform a variety of functions. For instance, the following block will give us the length of the fruit array.
+
+`let x = fruit.length();`
+
+There are several other methods:
+
+
+
diff --git a/react_week2_fixed/17.md b/react_week2_fixed/17.md
new file mode 100644
index 00000000..3c6e1c1d
--- /dev/null
+++ b/react_week2_fixed/17.md
@@ -0,0 +1,22 @@
+## .map()
+
+Using the `map()` keyword simplifies the indexing of arrays and returns the value you want.
+Let's assume that you recieve an array with the name and age of several people. However, you only want the ages of the people.
+
+```javascript
+let people = [
+ { age: 12, name: 'Harry' },
+ { age: 18, name: 'George' },
+ { age: 35, name: 'Franklin' },
+ { age: 27, name: 'Bill' }
+];
+// we want the ages of the people
+```
+
+You can use `.map()` to return the age of this object.
+
+```javascript
+const nameage = name.map(name => name.age);
+```
+
+`.map` looks through each individual element of an array and returns only what we are looking for.
\ No newline at end of file
diff --git a/react_week2_fixed/18.md b/react_week2_fixed/18.md
new file mode 100644
index 00000000..a6e25190
--- /dev/null
+++ b/react_week2_fixed/18.md
@@ -0,0 +1,34 @@
+## .reduce()
+
+Just like `.map()`, `.reduce()` looks through all the elements in an array but only returns one value that you want. Let's look at an example:
+
+```javascript
+let people = [
+ {
+ id: 1,
+ name: "Mike",
+ years: 64,
+ },
+ {
+ id: 2,
+ name: "Joe",
+ years: 79,
+ },
+ {
+ id: 3,
+ name: "Richard",
+ years: 58,
+ }
+];
+// we want the oldest person in this array
+```
+
+Using `.reduce()`, we'll be able to find the oldest person in the array:
+
+```javascript
+let oldestperson = people.reduce(function (old, people) {
+ return (old.years || 0) > people.years ? old : people;
+}, {});
+```
+
+Naming the accumulator `old` is a way to check each element in an array. If one person is older than the other, then that person becomes the new `old`.
\ No newline at end of file
diff --git a/react_week2_fixed/19.md b/react_week2_fixed/19.md
new file mode 100644
index 00000000..1ea5545c
--- /dev/null
+++ b/react_week2_fixed/19.md
@@ -0,0 +1,38 @@
+## .filter()
+
+`.filter()`, like both `.map()` and `.reduce()` is a way to generate values that you'd want.
+
+```javascript
+let student = [
+ {
+ id: 1,
+ name: "amy",
+ hometown: "stockton",
+ },
+ {
+ id: 2,
+ name: "bree",
+ hometwon: "sacramento",
+ },
+ {
+ id: 3,
+ name: "cierra",
+ hometown: "sacramento",
+ },
+ {
+ id: 4,
+ name: "diana",
+ hometown: "stockton",
+ }
+];
+// we want two arrays, one for the students from stockton, and the other for the students from sacramento
+```
+
+We'd create the two arrays like this:
+
+```javascript
+const stockton = student.filter(student => student.hometown === "stockton");
+const sacramento = student.filter(student => student.homewtown === "sacramento");
+```
+
+This checks if the value in hometown returns true for each function, which would place that value in the array.
\ No newline at end of file
diff --git a/react_week2_fixed/2.md b/react_week2_fixed/2.md
new file mode 100644
index 00000000..a75a099b
--- /dev/null
+++ b/react_week2_fixed/2.md
@@ -0,0 +1,43 @@
+## Introduction to JavaScript
+
+JS is written by inserting a "script" tag into the HTML webpage as shown here:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+The script tag can be placed in either the header tag or the body tag.
+
+Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
+
+
+
+
+
+
+
+**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
+
+
+
+
+
+
+
+
+
diff --git a/react_week2_fixed/20.md b/react_week2_fixed/20.md
new file mode 100644
index 00000000..9ea0d50a
--- /dev/null
+++ b/react_week2_fixed/20.md
@@ -0,0 +1,5 @@
+## Button
+
+With our new knowldge of JavaScript, let's make a button which on click, which would do something!
+
+We already used `onClick` to get an alert, so let's try something else.
\ No newline at end of file
diff --git a/react_week2_fixed/3.md b/react_week2_fixed/3.md
new file mode 100644
index 00000000..75d70430
--- /dev/null
+++ b/react_week2_fixed/3.md
@@ -0,0 +1,18 @@
+## External JS
+
+Although the
+
+External JavaScripts can either be put into the head or body part of the DOM. For the rest of the course, we'll be making new files and using external JavaScript in order to initialize the code.
+
+External scripts should not contain the script tag.
\ No newline at end of file
diff --git a/react_week2_fixed/4.md b/react_week2_fixed/4.md
new file mode 100644
index 00000000..24cf16cb
--- /dev/null
+++ b/react_week2_fixed/4.md
@@ -0,0 +1,24 @@
+## The If/Else Statements
+
+Let's examine the first one, the `if` and `else` conditional.
+
+```javascript
+
+ let carage = 4;
+ if (carage < 5)
+ {
+ document.write("I love cars!");
+ }
+ else
+ {
+ document.write("I don't like this car");
+ }
+```
+
+The above block of code will print `I love cars!` because the condition that carage<5 is fulfilled.
+
+If carage was equal to or greater than 5 (carage>=5), the `else` statement would have been printed.
+
+What happens if we have more than one condition?
+
+Enter the "else if" condition
\ No newline at end of file
diff --git a/react_week2_fixed/5.md b/react_week2_fixed/5.md
new file mode 100644
index 00000000..72b5e93d
--- /dev/null
+++ b/react_week2_fixed/5.md
@@ -0,0 +1,23 @@
+## Else if
+
+The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
+
+``` javascript
+ let carage = 5;
+ if (carage < 5)
+ {
+ document.write("I love cars!");
+ }
+ else if (carage===5)
+ {
+ alert("This one's alright");
+ }
+ else
+ {
+ document.write("I don't like this car");
+ }
+```
+
+
+Recall that `===` is what we use to equate. In this certain block of code, the script would print out `This one's alright` because it is the only condition which is true.
+
diff --git a/react_week2_fixed/6.md b/react_week2_fixed/6.md
new file mode 100644
index 00000000..192c3963
--- /dev/null
+++ b/react_week2_fixed/6.md
@@ -0,0 +1,24 @@
+## Switch
+
+The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
+
+``` javascript
+ const fruit = 'Papayas';
+switch (fruit) {
+ case 'Oranges':
+ document.write('Oranges are $0.59 a pound.');
+ break;
+ case 'Papayas':
+ document.write('Papayas are $2.79 a pound.');
+ break;
+ default:
+ document.write('Sorry, we are out of ' + fruit + '.');
+}
+```
+
+We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
+
+Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
+
+When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
+
diff --git a/react_week2_fixed/7.md b/react_week2_fixed/7.md
new file mode 100644
index 00000000..2e3b569f
--- /dev/null
+++ b/react_week2_fixed/7.md
@@ -0,0 +1,25 @@
+## For Loops
+
+For loops iterate a certain amount of times, often dictated by the amount of items in an array. Let's look at an example and dissect it from there:
+
+``` javascript
+ let fruit = ["Apple", "Banana", "Orange", "Melon", "Peach", "Plum"];
+ let i;
+ for (i = 0; i < fruit.length; i++) {
+ document.write(fruit[i] + ", ")
+ }
+```
+
+This script will iterate 5 times and will print this: `Apple, Banana, Orange, Melon, Peach, Plum`
+
+Recall that arrays start indexing their first item as fruit[0]. This means that fruit[5] becomes Plum. Hence, we can print all of the array.
+
+The general format of the for loop is as follows:
+
+`for (x,y,z){`
+
+`code to be executed`
+
+`}`
+
+where x is executed once before the code block, y defines the condition to the execution of the code block, and z executes after the code block has been executed.
\ No newline at end of file
diff --git a/react_week2_fixed/8.md b/react_week2_fixed/8.md
new file mode 100644
index 00000000..c8254c0f
--- /dev/null
+++ b/react_week2_fixed/8.md
@@ -0,0 +1,27 @@
+## While Loops
+
+While loops iterate through the loop for as long as the condition is true. Let's look at an example:
+
+``` javascript
+ var text = "";
+ var i = 0;
+ while (i < 10) {
+ text += " The number is " + i;
+ i++;
+}
+document.write(text)
+```
+
+This loop iterates 0-9 times, so our result will look like this:
+
+`The number is 0
+The number is 1` and so forth. The while loop iterated until i became 10, and then stopped iterating. The `i++` function adds 1 to i and increments it. `i--` would decrement the code.
+
+The general format of the while loop is as follows:
+
+`while (condition) {`
+
+`code to be executed`
+
+`}`
+
diff --git a/react_week2_fixed/9.md b/react_week2_fixed/9.md
new file mode 100644
index 00000000..b56fff81
--- /dev/null
+++ b/react_week2_fixed/9.md
@@ -0,0 +1,22 @@
+## Break
+
+Break statements forces the loop to stop iterating and forces the code onto the next line of text. Here's what a break statement would look like:
+
+``` js
+ let text = "";
+ let i;
+ for (i = 0; i < 10; i++) {
+ if (i === 3) { break; }
+ text += "The number is " + i + " ";
+}
+document.write(text)
+```
+
+
+Instead of printing all nine numbers, the code will print this:
+
+`The number is 0
+The number is 1
+The number is 2`
+
+Because it will `break` when `i===3` and will skip past any of the remaining code.
\ No newline at end of file
From e17fd784bebdbec4abbe4b8f372b9cabf6b0ca31 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:24:16 -0800
Subject: [PATCH 030/123] Delete 1.md
---
react_week2_fixed/1.md | 16 ----------------
1 file changed, 16 deletions(-)
delete mode 100644 react_week2_fixed/1.md
diff --git a/react_week2_fixed/1.md b/react_week2_fixed/1.md
deleted file mode 100644
index ee4c11e7..00000000
--- a/react_week2_fixed/1.md
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-# What is JavaScript?
-
-JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
-
-JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
-
-
-
-The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
-
-For instance, the tag goes at the top, and th
-
-
-
From a691bd1494f648520972df58a0d83806560b05af Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:24:23 -0800
Subject: [PATCH 031/123] Delete 10.md
---
react_week2_fixed/10.md | 17 -----------------
1 file changed, 17 deletions(-)
delete mode 100644 react_week2_fixed/10.md
diff --git a/react_week2_fixed/10.md b/react_week2_fixed/10.md
deleted file mode 100644
index 75b48215..00000000
--- a/react_week2_fixed/10.md
+++ /dev/null
@@ -1,17 +0,0 @@
-## Continue
-
-Continue values are like the "opposite" of breaks. Instead of breaking out of the loop, they reiterate the function:
-
-``` javascript
- let text = "";
- let i;
- for (i = 0; i < 10; i++) {
- if (i === 3) { continue; }
- text += "The number is " + i + " ";
-}
-document.write(text)
-```
-
-
-The result will skip over 3 until it reaches the end of the loop and then it will contunue to the next code block.
-
From be0320c59f13422915aa42462760d69ae72cc905 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:24:31 -0800
Subject: [PATCH 032/123] Delete 11.md
---
react_week2_fixed/11.md | 25 -------------------------
1 file changed, 25 deletions(-)
delete mode 100644 react_week2_fixed/11.md
diff --git a/react_week2_fixed/11.md b/react_week2_fixed/11.md
deleted file mode 100644
index aa8113f3..00000000
--- a/react_week2_fixed/11.md
+++ /dev/null
@@ -1,25 +0,0 @@
-## Functions
-
-A function in JavaScript is a block of code which is designed to do something. When the function is invoked, the code performs a certain task. In the example below, we want to multiply two numbers.
-
-``` javascript
- let x = myFunction(4, 3);
-function myFunction(a, b) {
- return a * b;
-}
-```
-
-
-The result will be 12.
-
-When the code hits the `return`, the code will stop executing.
-
-The general format for a function is as follows:
-
-`function name(parameter1, parameter2, parameter3...){`
-
-`code to be executed`
-
-}
-
-Functions are usefull because they can be defined according to our needs and can be used however we see fit.
\ No newline at end of file
From 2dcbeef8b0455cad77872f7775d71d03bd0df687 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:24:37 -0800
Subject: [PATCH 033/123] Delete 12.md
---
react_week2_fixed/12.md | 33 ---------------------------------
1 file changed, 33 deletions(-)
delete mode 100644 react_week2_fixed/12.md
diff --git a/react_week2_fixed/12.md b/react_week2_fixed/12.md
deleted file mode 100644
index d43066ce..00000000
--- a/react_week2_fixed/12.md
+++ /dev/null
@@ -1,33 +0,0 @@
-## Arrow Functions
-
-ES6 introduced "Arrow Functions", which make using functions easier.
-
-Here's the "Hello World!" as how we did it earlier
-
-``` JavaScript
-document.write("Hello World!");
-```
-
-And here's "Hello World!" using a function
-
-``` javascript
- hello = function(){
- return "Hello World!"
- }
-```
-
-And here's "Hello World" using an Arrow Function
-
-``` JavaScript
- hello = () => "Hello World!"
-```
-
-
-Notice that the function got shorter! If the function has one value and has a return function, we can omit the `function` and `return` statement all together.
-
-This provides compactness and clarity to the code.
-
-
-
-
-
From e488ecd902fc2fc269c659e0b5eb6ac53ba699d5 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:24:45 -0800
Subject: [PATCH 034/123] Delete 13.md
---
react_week2_fixed/13.md | 40 ----------------------------------------
1 file changed, 40 deletions(-)
delete mode 100644 react_week2_fixed/13.md
diff --git a/react_week2_fixed/13.md b/react_week2_fixed/13.md
deleted file mode 100644
index 87e8bd15..00000000
--- a/react_week2_fixed/13.md
+++ /dev/null
@@ -1,40 +0,0 @@
-## Objects Basics
-
-Almost all objects in JavaScript are parts of the keyword `Object`. Objects are usually initialized with the `Object()` method.
-
- Objects "inherit" their properties from other objects, often called "object prototypes." This inheritance based on linking prototypes together is known as the "prototype chain." Prototypes are defined by `Object.prototype`
-
-Objects can be thought of as a variable that holds many data types in **name:value** pairs. We can access the data stored in objects by calling the name.
-
-```JavaScript
-let person = {
- firstName: "John",
- lastName: "Doe",
- fullName: () => this.firstName + " " + this.lastName
- }
-};
-```
-
-We can call the properties in this object in two ways:
-
-```JavaScript
-object.name
-// or
-object['name']
-```
-
-We could call the first name of the `person` variable like this:
-
-```JavaScript
-let call = person.firstName;
-// or
-let call = person['firstName'];
-```
-
-We've been using objects and their methods this whole time!
-
-```JavaScript
-document.write("Hello World!")
-```
-
-The `write()` method is modifying the `document` object. Similarly,
\ No newline at end of file
From 919fdf7032facf7a7983a4d1d59a9ee67de2404e Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:24:58 -0800
Subject: [PATCH 035/123] Delete 14.md
---
react_week2_fixed/14.md | 35 -----------------------------------
1 file changed, 35 deletions(-)
delete mode 100644 react_week2_fixed/14.md
diff --git a/react_week2_fixed/14.md b/react_week2_fixed/14.md
deleted file mode 100644
index 6f5881b2..00000000
--- a/react_week2_fixed/14.md
+++ /dev/null
@@ -1,35 +0,0 @@
-## Objects Advanced
-
-Now that we know how Objects look like in JavaScript, let's constuct our own objects.
-
-``` JavaScript
-let person = {
- name: "John",
- age: 10,
- hometown: "davis"
-}
-```
-
-This method only allows you to create one object. If we want to create several objects, we will want to create an object type.
-
-```javascript
-function person(name, age, hometown){
- this.name=name;
- this.age=age;
- this.hometown=hometown;;
-}
-// the keyword "this" is a reserved keyword which refers to the current object
-// "this" is not a variable and cannot be changed
-```
-
-This is an "object constructor", which takes parameters and allows the assignment to object properties. Now, if we want to create new object, we can use the `new` keyword
-
-```javascript
-function person(name, age, hometown){
- this.name=name;
- this.age=age;
- this.hometown=hometown;
-}
-let John= new person("John",10,"davis")
-```
-
From 99927fe3d312aaf83f8b9ee08ee48b04e4982832 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:25:07 -0800
Subject: [PATCH 036/123] Delete 15.md
---
react_week2_fixed/15.md | 26 --------------------------
1 file changed, 26 deletions(-)
delete mode 100644 react_week2_fixed/15.md
diff --git a/react_week2_fixed/15.md b/react_week2_fixed/15.md
deleted file mode 100644
index b703d39c..00000000
--- a/react_week2_fixed/15.md
+++ /dev/null
@@ -1,26 +0,0 @@
-## Events
-
-Events allow the user to interact with the webpage and is what sets JavaScript apart from other languages.
-
-``` JavaScript
- document.querySelector('html').onclick = function() {
- alert('Now, this is interactivity!');
-```
-
-
-The `querySelector` selects the `` element, setting onclick to a nameless function, which are also called anonymous functions, and generating the alert.
-
-Let's generate another event, one that tells us the date and time:
-
-``` javascript
-function displayDate() {
- document.getElementById("time").innerHTML = Date();
-}
-```
-
-When run, this little bit of code will allow us to generate the time that it currently is using JavaScript. Of course, we're going to need someway to generate the date and time, and for that we would use the button function in HTML. That's going to be your challenge activity.
-
-Here's a common list of events:
-
-
-
From 8dfe1bd010373ba4481822ec9cd50eedfcca6111 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:25:16 -0800
Subject: [PATCH 037/123] Delete 16.md
---
react_week2_fixed/16.md | 32 --------------------------------
1 file changed, 32 deletions(-)
delete mode 100644 react_week2_fixed/16.md
diff --git a/react_week2_fixed/16.md b/react_week2_fixed/16.md
deleted file mode 100644
index fab24a9c..00000000
--- a/react_week2_fixed/16.md
+++ /dev/null
@@ -1,32 +0,0 @@
-## Arrays
-
-JavaScript allows arrays, a special type of object.
-
-This is an example of an array:
-
-`let fruit = ["Mango", "Apple", "Banana"]`
-
-It functions as a list. The easiest way to create an array is
-
-`let array_name = [item1, item2, item3...]`
-
-JS has a keyword named `new` which creates and assigns values to it:
-
-`let fruit = new Array ("Mango", "Apple", Banana)`
-
-To access an item of an array, we reference the **index number**
-
-`let name = fruit[0]` will return the first item in the array, which is "Mango". In JS, indexing starts at "0", meaning that the first item is referenced as 0.
-
-What happens if we want to change an item in an array? We do this:
-
-`fruit[0]=Watermelon` This assigns the first item to the value "Watermelon"
-
-We can use different methods to perform a variety of functions. For instance, the following block will give us the length of the fruit array.
-
-`let x = fruit.length();`
-
-There are several other methods:
-
-
-
From 8cace935bc6aed0bf00b55c0285daa7442f01f32 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:25:26 -0800
Subject: [PATCH 038/123] Delete 17.md
---
react_week2_fixed/17.md | 22 ----------------------
1 file changed, 22 deletions(-)
delete mode 100644 react_week2_fixed/17.md
diff --git a/react_week2_fixed/17.md b/react_week2_fixed/17.md
deleted file mode 100644
index 3c6e1c1d..00000000
--- a/react_week2_fixed/17.md
+++ /dev/null
@@ -1,22 +0,0 @@
-## .map()
-
-Using the `map()` keyword simplifies the indexing of arrays and returns the value you want.
-Let's assume that you recieve an array with the name and age of several people. However, you only want the ages of the people.
-
-```javascript
-let people = [
- { age: 12, name: 'Harry' },
- { age: 18, name: 'George' },
- { age: 35, name: 'Franklin' },
- { age: 27, name: 'Bill' }
-];
-// we want the ages of the people
-```
-
-You can use `.map()` to return the age of this object.
-
-```javascript
-const nameage = name.map(name => name.age);
-```
-
-`.map` looks through each individual element of an array and returns only what we are looking for.
\ No newline at end of file
From 275089240ebd0ef4f09ed692ac53dd7da26ebad2 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:25:32 -0800
Subject: [PATCH 039/123] Delete 18.md
---
react_week2_fixed/18.md | 34 ----------------------------------
1 file changed, 34 deletions(-)
delete mode 100644 react_week2_fixed/18.md
diff --git a/react_week2_fixed/18.md b/react_week2_fixed/18.md
deleted file mode 100644
index a6e25190..00000000
--- a/react_week2_fixed/18.md
+++ /dev/null
@@ -1,34 +0,0 @@
-## .reduce()
-
-Just like `.map()`, `.reduce()` looks through all the elements in an array but only returns one value that you want. Let's look at an example:
-
-```javascript
-let people = [
- {
- id: 1,
- name: "Mike",
- years: 64,
- },
- {
- id: 2,
- name: "Joe",
- years: 79,
- },
- {
- id: 3,
- name: "Richard",
- years: 58,
- }
-];
-// we want the oldest person in this array
-```
-
-Using `.reduce()`, we'll be able to find the oldest person in the array:
-
-```javascript
-let oldestperson = people.reduce(function (old, people) {
- return (old.years || 0) > people.years ? old : people;
-}, {});
-```
-
-Naming the accumulator `old` is a way to check each element in an array. If one person is older than the other, then that person becomes the new `old`.
\ No newline at end of file
From c4684277f806df02c783cb7dc15c16e5b59ad175 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:25:39 -0800
Subject: [PATCH 040/123] Delete 19.md
---
react_week2_fixed/19.md | 38 --------------------------------------
1 file changed, 38 deletions(-)
delete mode 100644 react_week2_fixed/19.md
diff --git a/react_week2_fixed/19.md b/react_week2_fixed/19.md
deleted file mode 100644
index 1ea5545c..00000000
--- a/react_week2_fixed/19.md
+++ /dev/null
@@ -1,38 +0,0 @@
-## .filter()
-
-`.filter()`, like both `.map()` and `.reduce()` is a way to generate values that you'd want.
-
-```javascript
-let student = [
- {
- id: 1,
- name: "amy",
- hometown: "stockton",
- },
- {
- id: 2,
- name: "bree",
- hometwon: "sacramento",
- },
- {
- id: 3,
- name: "cierra",
- hometown: "sacramento",
- },
- {
- id: 4,
- name: "diana",
- hometown: "stockton",
- }
-];
-// we want two arrays, one for the students from stockton, and the other for the students from sacramento
-```
-
-We'd create the two arrays like this:
-
-```javascript
-const stockton = student.filter(student => student.hometown === "stockton");
-const sacramento = student.filter(student => student.homewtown === "sacramento");
-```
-
-This checks if the value in hometown returns true for each function, which would place that value in the array.
\ No newline at end of file
From ca28831f575a891e8db62e9e4441d18d3454ffba Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:25:52 -0800
Subject: [PATCH 041/123] Delete 2.md
---
react_week2_fixed/2.md | 43 ------------------------------------------
1 file changed, 43 deletions(-)
delete mode 100644 react_week2_fixed/2.md
diff --git a/react_week2_fixed/2.md b/react_week2_fixed/2.md
deleted file mode 100644
index a75a099b..00000000
--- a/react_week2_fixed/2.md
+++ /dev/null
@@ -1,43 +0,0 @@
-## Introduction to JavaScript
-
-JS is written by inserting a "script" tag into the HTML webpage as shown here:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-The script tag can be placed in either the header tag or the body tag.
-
-Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
-
-
-
-
-
-
-
-**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
-
-
-
-
-
-
-
-
-
From c27afef67c184a4f7547c6e4dc78f5901f1bb292 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:25:59 -0800
Subject: [PATCH 042/123] Delete 20.md
---
react_week2_fixed/20.md | 5 -----
1 file changed, 5 deletions(-)
delete mode 100644 react_week2_fixed/20.md
diff --git a/react_week2_fixed/20.md b/react_week2_fixed/20.md
deleted file mode 100644
index 9ea0d50a..00000000
--- a/react_week2_fixed/20.md
+++ /dev/null
@@ -1,5 +0,0 @@
-## Button
-
-With our new knowldge of JavaScript, let's make a button which on click, which would do something!
-
-We already used `onClick` to get an alert, so let's try something else.
\ No newline at end of file
From 4451d35c5bd0396031bf42a18b2bcb4b5c9f0db9 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:26:06 -0800
Subject: [PATCH 043/123] Delete 3.md
---
react_week2_fixed/3.md | 18 ------------------
1 file changed, 18 deletions(-)
delete mode 100644 react_week2_fixed/3.md
diff --git a/react_week2_fixed/3.md b/react_week2_fixed/3.md
deleted file mode 100644
index 75d70430..00000000
--- a/react_week2_fixed/3.md
+++ /dev/null
@@ -1,18 +0,0 @@
-## External JS
-
-Although the
-
-External JavaScripts can either be put into the head or body part of the DOM. For the rest of the course, we'll be making new files and using external JavaScript in order to initialize the code.
-
-External scripts should not contain the script tag.
\ No newline at end of file
From 3167614928e1764c6194c03981baa15a499dc678 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:26:13 -0800
Subject: [PATCH 044/123] Delete 4.md
---
react_week2_fixed/4.md | 24 ------------------------
1 file changed, 24 deletions(-)
delete mode 100644 react_week2_fixed/4.md
diff --git a/react_week2_fixed/4.md b/react_week2_fixed/4.md
deleted file mode 100644
index 24cf16cb..00000000
--- a/react_week2_fixed/4.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## The If/Else Statements
-
-Let's examine the first one, the `if` and `else` conditional.
-
-```javascript
-
- let carage = 4;
- if (carage < 5)
- {
- document.write("I love cars!");
- }
- else
- {
- document.write("I don't like this car");
- }
-```
-
-The above block of code will print `I love cars!` because the condition that carage<5 is fulfilled.
-
-If carage was equal to or greater than 5 (carage>=5), the `else` statement would have been printed.
-
-What happens if we have more than one condition?
-
-Enter the "else if" condition
\ No newline at end of file
From 3475e6cf5319594af48877e2c4181ac39ac8615d Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:26:21 -0800
Subject: [PATCH 045/123] Delete 5.md
---
react_week2_fixed/5.md | 23 -----------------------
1 file changed, 23 deletions(-)
delete mode 100644 react_week2_fixed/5.md
diff --git a/react_week2_fixed/5.md b/react_week2_fixed/5.md
deleted file mode 100644
index 72b5e93d..00000000
--- a/react_week2_fixed/5.md
+++ /dev/null
@@ -1,23 +0,0 @@
-## Else if
-
-The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
-
-``` javascript
- let carage = 5;
- if (carage < 5)
- {
- document.write("I love cars!");
- }
- else if (carage===5)
- {
- alert("This one's alright");
- }
- else
- {
- document.write("I don't like this car");
- }
-```
-
-
-Recall that `===` is what we use to equate. In this certain block of code, the script would print out `This one's alright` because it is the only condition which is true.
-
From 054c1c8ddae0b5781dc29af46036e870b80e3738 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:26:28 -0800
Subject: [PATCH 046/123] Delete 6.md
---
react_week2_fixed/6.md | 24 ------------------------
1 file changed, 24 deletions(-)
delete mode 100644 react_week2_fixed/6.md
diff --git a/react_week2_fixed/6.md b/react_week2_fixed/6.md
deleted file mode 100644
index 192c3963..00000000
--- a/react_week2_fixed/6.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## Switch
-
-The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
-
-``` javascript
- const fruit = 'Papayas';
-switch (fruit) {
- case 'Oranges':
- document.write('Oranges are $0.59 a pound.');
- break;
- case 'Papayas':
- document.write('Papayas are $2.79 a pound.');
- break;
- default:
- document.write('Sorry, we are out of ' + fruit + '.');
-}
-```
-
-We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
-
-Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
-
-When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
-
From 3acff19eab18f28b9714301aab1d8b3f1d40fff5 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:26:34 -0800
Subject: [PATCH 047/123] Delete 7.md
---
react_week2_fixed/7.md | 25 -------------------------
1 file changed, 25 deletions(-)
delete mode 100644 react_week2_fixed/7.md
diff --git a/react_week2_fixed/7.md b/react_week2_fixed/7.md
deleted file mode 100644
index 2e3b569f..00000000
--- a/react_week2_fixed/7.md
+++ /dev/null
@@ -1,25 +0,0 @@
-## For Loops
-
-For loops iterate a certain amount of times, often dictated by the amount of items in an array. Let's look at an example and dissect it from there:
-
-``` javascript
- let fruit = ["Apple", "Banana", "Orange", "Melon", "Peach", "Plum"];
- let i;
- for (i = 0; i < fruit.length; i++) {
- document.write(fruit[i] + ", ")
- }
-```
-
-This script will iterate 5 times and will print this: `Apple, Banana, Orange, Melon, Peach, Plum`
-
-Recall that arrays start indexing their first item as fruit[0]. This means that fruit[5] becomes Plum. Hence, we can print all of the array.
-
-The general format of the for loop is as follows:
-
-`for (x,y,z){`
-
-`code to be executed`
-
-`}`
-
-where x is executed once before the code block, y defines the condition to the execution of the code block, and z executes after the code block has been executed.
\ No newline at end of file
From 99e71bd7cf02da14064a03c6e09fabb9e353355e Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:26:45 -0800
Subject: [PATCH 048/123] Delete 8.md
---
react_week2_fixed/8.md | 27 ---------------------------
1 file changed, 27 deletions(-)
delete mode 100644 react_week2_fixed/8.md
diff --git a/react_week2_fixed/8.md b/react_week2_fixed/8.md
deleted file mode 100644
index c8254c0f..00000000
--- a/react_week2_fixed/8.md
+++ /dev/null
@@ -1,27 +0,0 @@
-## While Loops
-
-While loops iterate through the loop for as long as the condition is true. Let's look at an example:
-
-``` javascript
- var text = "";
- var i = 0;
- while (i < 10) {
- text += " The number is " + i;
- i++;
-}
-document.write(text)
-```
-
-This loop iterates 0-9 times, so our result will look like this:
-
-`The number is 0
-The number is 1` and so forth. The while loop iterated until i became 10, and then stopped iterating. The `i++` function adds 1 to i and increments it. `i--` would decrement the code.
-
-The general format of the while loop is as follows:
-
-`while (condition) {`
-
-`code to be executed`
-
-`}`
-
From a949477c3330ff420e4eecf712f464fe78160a26 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:26:53 -0800
Subject: [PATCH 049/123] Delete 9.md
---
react_week2_fixed/9.md | 22 ----------------------
1 file changed, 22 deletions(-)
delete mode 100644 react_week2_fixed/9.md
diff --git a/react_week2_fixed/9.md b/react_week2_fixed/9.md
deleted file mode 100644
index b56fff81..00000000
--- a/react_week2_fixed/9.md
+++ /dev/null
@@ -1,22 +0,0 @@
-## Break
-
-Break statements forces the loop to stop iterating and forces the code onto the next line of text. Here's what a break statement would look like:
-
-``` js
- let text = "";
- let i;
- for (i = 0; i < 10; i++) {
- if (i === 3) { break; }
- text += "The number is " + i + " ";
-}
-document.write(text)
-```
-
-
-Instead of printing all nine numbers, the code will print this:
-
-`The number is 0
-The number is 1
-The number is 2`
-
-Because it will `break` when `i===3` and will skip past any of the remaining code.
\ No newline at end of file
From 0356837dcede3d3714b26632797f860b18182303 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Mon, 24 Feb 2020 17:28:01 -0800
Subject: [PATCH 050/123] Add files via upload
fixed the react_week_2 curriculum by changing all the examples to be related to the button
---
react_week2_fixed/1.md | 16 +++++++++++++++
react_week2_fixed/10.md | 17 ++++++++++++++++
react_week2_fixed/11.md | 25 ++++++++++++++++++++++++
react_week2_fixed/12.md | 33 +++++++++++++++++++++++++++++++
react_week2_fixed/13.md | 40 ++++++++++++++++++++++++++++++++++++++
react_week2_fixed/14.md | 35 +++++++++++++++++++++++++++++++++
react_week2_fixed/15.md | 26 +++++++++++++++++++++++++
react_week2_fixed/16.md | 32 ++++++++++++++++++++++++++++++
react_week2_fixed/17.md | 22 +++++++++++++++++++++
react_week2_fixed/18.md | 34 ++++++++++++++++++++++++++++++++
react_week2_fixed/19.md | 38 ++++++++++++++++++++++++++++++++++++
react_week2_fixed/2.md | 43 +++++++++++++++++++++++++++++++++++++++++
react_week2_fixed/20.md | 5 +++++
react_week2_fixed/3.md | 18 +++++++++++++++++
react_week2_fixed/4.md | 24 +++++++++++++++++++++++
react_week2_fixed/5.md | 24 +++++++++++++++++++++++
react_week2_fixed/6.md | 24 +++++++++++++++++++++++
react_week2_fixed/7.md | 25 ++++++++++++++++++++++++
react_week2_fixed/8.md | 27 ++++++++++++++++++++++++++
react_week2_fixed/9.md | 22 +++++++++++++++++++++
20 files changed, 530 insertions(+)
create mode 100644 react_week2_fixed/1.md
create mode 100644 react_week2_fixed/10.md
create mode 100644 react_week2_fixed/11.md
create mode 100644 react_week2_fixed/12.md
create mode 100644 react_week2_fixed/13.md
create mode 100644 react_week2_fixed/14.md
create mode 100644 react_week2_fixed/15.md
create mode 100644 react_week2_fixed/16.md
create mode 100644 react_week2_fixed/17.md
create mode 100644 react_week2_fixed/18.md
create mode 100644 react_week2_fixed/19.md
create mode 100644 react_week2_fixed/2.md
create mode 100644 react_week2_fixed/20.md
create mode 100644 react_week2_fixed/3.md
create mode 100644 react_week2_fixed/4.md
create mode 100644 react_week2_fixed/5.md
create mode 100644 react_week2_fixed/6.md
create mode 100644 react_week2_fixed/7.md
create mode 100644 react_week2_fixed/8.md
create mode 100644 react_week2_fixed/9.md
diff --git a/react_week2_fixed/1.md b/react_week2_fixed/1.md
new file mode 100644
index 00000000..ee4c11e7
--- /dev/null
+++ b/react_week2_fixed/1.md
@@ -0,0 +1,16 @@
+
+
+# What is JavaScript?
+
+JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
+
+JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
+
+
+
+The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
+
+For instance, the tag goes at the top, and th
+
+
+
diff --git a/react_week2_fixed/10.md b/react_week2_fixed/10.md
new file mode 100644
index 00000000..05584372
--- /dev/null
+++ b/react_week2_fixed/10.md
@@ -0,0 +1,17 @@
+## Continue
+
+Continue values are like the "opposite" of breaks. Instead of breaking out of the loop, they reiterate the function:
+
+``` javascript
+ let buttontext = "";
+ let i;
+ for (i = 0; i < 10; i++) {
+ if (i === 3) { continue; }
+ buttontext += "The number is " + i + " ";
+}
+document.write(buttontext)
+```
+
+
+The result will skip over 3 until it reaches the end of the loop and then it will contunue to the next code block.
+
diff --git a/react_week2_fixed/11.md b/react_week2_fixed/11.md
new file mode 100644
index 00000000..b3372a64
--- /dev/null
+++ b/react_week2_fixed/11.md
@@ -0,0 +1,25 @@
+## Functions
+
+A function in JavaScript is a block of code which is designed to do something. When the function is invoked, the code performs a certain task. In the example below, we want to multiply two numbers.
+
+``` javascript
+ let x = buttonFunction(4, 3);
+function buttonFunction(a, b) {
+ return a * b;
+}
+```
+
+
+The result will be 12.
+
+When the code hits the `return`, the code will stop executing.
+
+The general format for a function is as follows:
+
+`function name(parameter1, parameter2, parameter3...){`
+
+`code to be executed`
+
+}
+
+Functions are usefull because they can be defined according to our needs and can be used however we see fit.
\ No newline at end of file
diff --git a/react_week2_fixed/12.md b/react_week2_fixed/12.md
new file mode 100644
index 00000000..d43066ce
--- /dev/null
+++ b/react_week2_fixed/12.md
@@ -0,0 +1,33 @@
+## Arrow Functions
+
+ES6 introduced "Arrow Functions", which make using functions easier.
+
+Here's the "Hello World!" as how we did it earlier
+
+``` JavaScript
+document.write("Hello World!");
+```
+
+And here's "Hello World!" using a function
+
+``` javascript
+ hello = function(){
+ return "Hello World!"
+ }
+```
+
+And here's "Hello World" using an Arrow Function
+
+``` JavaScript
+ hello = () => "Hello World!"
+```
+
+
+Notice that the function got shorter! If the function has one value and has a return function, we can omit the `function` and `return` statement all together.
+
+This provides compactness and clarity to the code.
+
+
+
+
+
diff --git a/react_week2_fixed/13.md b/react_week2_fixed/13.md
new file mode 100644
index 00000000..f8958d47
--- /dev/null
+++ b/react_week2_fixed/13.md
@@ -0,0 +1,40 @@
+## Objects Basics
+
+Almost all objects in JavaScript are parts of the keyword `Object`. Objects are usually initialized with the `Object()` method.
+
+ Objects "inherit" their properties from other objects, often called "object prototypes." This inheritance based on linking prototypes together is known as the "prototype chain." Prototypes are defined by `Object.prototype`
+
+Objects can be thought of as a variable that holds many data types in **name:value** pairs. We can access the data stored in objects by calling the name.
+
+```JavaScript
+let button = {
+ name: "color changer",
+ text: "this changes colors",
+ buttonwords: () => this.name + " " + this.text
+ }
+};
+```
+
+We can call the properties in this object in two ways:
+
+```JavaScript
+object.name
+// or
+object['name']
+```
+
+We could call the first name of the `person` variable like this:
+
+```JavaScript
+let call = button.name;
+// or
+let call = button['name'];
+```
+
+We've been using objects and their methods this whole time!
+
+```JavaScript
+document.write("Hello World!")
+```
+
+The `write()` method is modifying the `document` object. Similarly,
\ No newline at end of file
diff --git a/react_week2_fixed/14.md b/react_week2_fixed/14.md
new file mode 100644
index 00000000..4119d84c
--- /dev/null
+++ b/react_week2_fixed/14.md
@@ -0,0 +1,35 @@
+## Objects Advanced
+
+Now that we know how Objects look like in JavaScript, let's constuct our own objects.
+
+``` JavaScript
+let button = {
+ color: "blue",
+ size: 50,
+ content: "click me!"
+}
+```
+
+This method only allows you to create one object. If we want to create several objects, we will want to create an object type.
+
+```javascript
+function button(color, size, content){
+ this.color=color;
+ this.size=size;
+ this.content=content;;
+}
+// the keyword "this" is a reserved keyword which refers to the current object
+// "this" is not a variable and cannot be changed
+```
+
+This is an "object constructor", which takes parameters and allows the assignment to object properties. Now, if we want to create new object, we can use the `new` keyword
+
+```javascript
+function button(color, size, content){
+ this.color=color;
+ this.size=size;
+ this.content=content;;
+}
+let orderbutton= new button("blue",50,"clickme!")
+```
+
diff --git a/react_week2_fixed/15.md b/react_week2_fixed/15.md
new file mode 100644
index 00000000..b703d39c
--- /dev/null
+++ b/react_week2_fixed/15.md
@@ -0,0 +1,26 @@
+## Events
+
+Events allow the user to interact with the webpage and is what sets JavaScript apart from other languages.
+
+``` JavaScript
+ document.querySelector('html').onclick = function() {
+ alert('Now, this is interactivity!');
+```
+
+
+The `querySelector` selects the `` element, setting onclick to a nameless function, which are also called anonymous functions, and generating the alert.
+
+Let's generate another event, one that tells us the date and time:
+
+``` javascript
+function displayDate() {
+ document.getElementById("time").innerHTML = Date();
+}
+```
+
+When run, this little bit of code will allow us to generate the time that it currently is using JavaScript. Of course, we're going to need someway to generate the date and time, and for that we would use the button function in HTML. That's going to be your challenge activity.
+
+Here's a common list of events:
+
+
+
diff --git a/react_week2_fixed/16.md b/react_week2_fixed/16.md
new file mode 100644
index 00000000..fab24a9c
--- /dev/null
+++ b/react_week2_fixed/16.md
@@ -0,0 +1,32 @@
+## Arrays
+
+JavaScript allows arrays, a special type of object.
+
+This is an example of an array:
+
+`let fruit = ["Mango", "Apple", "Banana"]`
+
+It functions as a list. The easiest way to create an array is
+
+`let array_name = [item1, item2, item3...]`
+
+JS has a keyword named `new` which creates and assigns values to it:
+
+`let fruit = new Array ("Mango", "Apple", Banana)`
+
+To access an item of an array, we reference the **index number**
+
+`let name = fruit[0]` will return the first item in the array, which is "Mango". In JS, indexing starts at "0", meaning that the first item is referenced as 0.
+
+What happens if we want to change an item in an array? We do this:
+
+`fruit[0]=Watermelon` This assigns the first item to the value "Watermelon"
+
+We can use different methods to perform a variety of functions. For instance, the following block will give us the length of the fruit array.
+
+`let x = fruit.length();`
+
+There are several other methods:
+
+
+
diff --git a/react_week2_fixed/17.md b/react_week2_fixed/17.md
new file mode 100644
index 00000000..a199c8c3
--- /dev/null
+++ b/react_week2_fixed/17.md
@@ -0,0 +1,22 @@
+## .map()
+
+Using the `map()` keyword simplifies the indexing of arrays and returns the value you want.
+Let's assume that you recieve an array with the name and age of several people. However, you only want the ages of the people.
+
+```javascript
+let button = [
+ { color: "blue", text: 'click me!' },
+ { color: "red", text: 'test button' },
+ { color: "black", text: 'generate!' },
+ { color: "green", text: 'see results!' }
+];
+// we want the color of the button
+```
+
+You can use `.map()` to return the age of this object.
+
+```javascript
+const buttoncolor = button.map(button => button.color);
+```
+
+`.map` looks through each individual element of an array and returns only what we are looking for.
\ No newline at end of file
diff --git a/react_week2_fixed/18.md b/react_week2_fixed/18.md
new file mode 100644
index 00000000..2b88bf8c
--- /dev/null
+++ b/react_week2_fixed/18.md
@@ -0,0 +1,34 @@
+## .reduce()
+
+Just like `.map()`, `.reduce()` looks through all the elements in an array but only returns one value that you want. Let's look at an example:
+
+```javascript
+let button = [
+ {
+ id: 1,
+ text: "1",
+ value: 1,
+ },
+ {
+ id: 2,
+ text: "+",
+ value: 0 ,
+ },
+ {
+ id: 3,
+ text: "2",
+ value: 2,
+ }
+];
+// we want the largest value in this array
+```
+
+Using `.reduce()`, we'll be able to find the oldest person in the array:
+
+```javascript
+let largestvalue = button.reduce(function (largevalue, button) {
+ return (largevalue.value || 0) > button.value ? largevalue : button;
+}, {});
+```
+
+Naming the accumulator `largevalue` is a way to check each element in an array. If one value is larger than the other, then that value becomes the new `largevalue`.
\ No newline at end of file
diff --git a/react_week2_fixed/19.md b/react_week2_fixed/19.md
new file mode 100644
index 00000000..1175ec14
--- /dev/null
+++ b/react_week2_fixed/19.md
@@ -0,0 +1,38 @@
+## .filter()
+
+`.filter()`, like both `.map()` and `.reduce()` is a way to generate values that you'd want.
+
+```javascript
+let button = [
+ {
+ id: 1,
+ text: "Hi!",
+ language: "english" ,
+ },
+ {
+ id: 2,
+ text: "Hola!",
+ language: "spanish" ,
+ },
+ {
+ id: 3,
+ text: "Thanks!",
+ language: "english",
+ },
+ {
+ id: 4,
+ text: "Gracias!",
+ language: "spanish",
+ }
+];
+// we want two arrays, one for the button language that is spanish and the other that is english
+```
+
+We'd create the two arrays like this:
+
+```javascript
+const spanish = button.filter(button => button.language === "spanish");
+const english = button.filter(button => button.language === "english");
+```
+
+This checks if the value in `language` returns true for each function, which would place that value in the array.
\ No newline at end of file
diff --git a/react_week2_fixed/2.md b/react_week2_fixed/2.md
new file mode 100644
index 00000000..a75a099b
--- /dev/null
+++ b/react_week2_fixed/2.md
@@ -0,0 +1,43 @@
+## Introduction to JavaScript
+
+JS is written by inserting a "script" tag into the HTML webpage as shown here:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+The script tag can be placed in either the header tag or the body tag.
+
+Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
+
+
+
+
+
+
+
+**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
+
+
+
+
+
+
+
+
+
diff --git a/react_week2_fixed/20.md b/react_week2_fixed/20.md
new file mode 100644
index 00000000..9ea0d50a
--- /dev/null
+++ b/react_week2_fixed/20.md
@@ -0,0 +1,5 @@
+## Button
+
+With our new knowldge of JavaScript, let's make a button which on click, which would do something!
+
+We already used `onClick` to get an alert, so let's try something else.
\ No newline at end of file
diff --git a/react_week2_fixed/3.md b/react_week2_fixed/3.md
new file mode 100644
index 00000000..75d70430
--- /dev/null
+++ b/react_week2_fixed/3.md
@@ -0,0 +1,18 @@
+## External JS
+
+Although the
+
+External JavaScripts can either be put into the head or body part of the DOM. For the rest of the course, we'll be making new files and using external JavaScript in order to initialize the code.
+
+External scripts should not contain the script tag.
\ No newline at end of file
diff --git a/react_week2_fixed/4.md b/react_week2_fixed/4.md
new file mode 100644
index 00000000..5e2a5bf9
--- /dev/null
+++ b/react_week2_fixed/4.md
@@ -0,0 +1,24 @@
+## The If/Else Statements
+
+Let's examine the first one, the `if` and `else` conditional.
+
+```javascript
+
+ let buttonsize = 4;
+ if (buttonsize < 5)
+ {
+ document.write("Button is too small!");
+ }
+ else
+ {
+ document.write("Button is too big!");
+ }
+```
+
+The above block of code will print `Button is too small!` because the condition that button size<5 is fulfilled.
+
+If buttonsize was equal to or greater than 5 (buttonsize>=5), the `else` statement would have been printed.
+
+What happens if we have more than one condition?
+
+Enter the "else if" condition
\ No newline at end of file
diff --git a/react_week2_fixed/5.md b/react_week2_fixed/5.md
new file mode 100644
index 00000000..dee6f7b7
--- /dev/null
+++ b/react_week2_fixed/5.md
@@ -0,0 +1,24 @@
+## Else if
+
+The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
+
+``` javascript
+
+ let buttonsize = 4;
+ if (buttonsize < 5)
+ {
+ document.write("Button is too small!");
+ }
+ else if (buttonsize===5)
+ {
+ alert("Perfect size!");
+ }
+ else
+ {
+ document.write("Button is too big!");
+ }
+```
+
+
+Recall that `===` is what we use to equate. In this certain block of code, the script would print out `This one's alright` because it is the only condition which is true.
+
diff --git a/react_week2_fixed/6.md b/react_week2_fixed/6.md
new file mode 100644
index 00000000..192c3963
--- /dev/null
+++ b/react_week2_fixed/6.md
@@ -0,0 +1,24 @@
+## Switch
+
+The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
+
+``` javascript
+ const fruit = 'Papayas';
+switch (fruit) {
+ case 'Oranges':
+ document.write('Oranges are $0.59 a pound.');
+ break;
+ case 'Papayas':
+ document.write('Papayas are $2.79 a pound.');
+ break;
+ default:
+ document.write('Sorry, we are out of ' + fruit + '.');
+}
+```
+
+We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
+
+Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
+
+When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
+
diff --git a/react_week2_fixed/7.md b/react_week2_fixed/7.md
new file mode 100644
index 00000000..7437edeb
--- /dev/null
+++ b/react_week2_fixed/7.md
@@ -0,0 +1,25 @@
+## For Loops
+
+For loops iterate a certain amount of times, often dictated by the amount of items in an array. Let's look at an example and dissect it from there:
+
+``` javascript
+ let buttoncolor = ["Red", "Blue", "Green", "Yellow", "Maroon", "Black"];
+ let i;
+ for (i = 0; i < buttoncolor.length; i++) {
+ document.write(buttoncolor[i] + ", ")
+ }
+```
+
+This script will iterate 5 times and will print this: `Red, Blue, Green, Yellow, Maroon, Black`
+
+Recall that arrays start indexing their first item as buttoncolor[0]. This means that buttoncolor[5] becomes `Black`. Hence, we can print all of the array.
+
+The general format of the for loop is as follows:
+
+`for (x,y,z){`
+
+`code to be executed`
+
+`}`
+
+where x is executed once before the code block, y defines the condition to the execution of the code block, and z executes after the code block has been executed.
\ No newline at end of file
diff --git a/react_week2_fixed/8.md b/react_week2_fixed/8.md
new file mode 100644
index 00000000..fbb9e489
--- /dev/null
+++ b/react_week2_fixed/8.md
@@ -0,0 +1,27 @@
+## While Loops
+
+While loops iterate through the loop for as long as the condition is true. Let's look at an example:
+
+``` javascript
+ var buttontext = "";
+ var i = 0;
+ while (i < 10) {
+ buttontext += " The number is " + i;
+ i++;
+}
+document.write(buttontext)
+```
+
+This loop iterates 0-9 times, so our result will look like this:
+
+`The number is 0
+The number is 1` and so forth. The while loop iterated until i became 10, and then stopped iterating. The `i++` function adds 1 to i and increments it. `i--` would decrement the code.
+
+The general format of the while loop is as follows:
+
+`while (condition) {`
+
+`code to be executed`
+
+`}`
+
diff --git a/react_week2_fixed/9.md b/react_week2_fixed/9.md
new file mode 100644
index 00000000..fc180c9d
--- /dev/null
+++ b/react_week2_fixed/9.md
@@ -0,0 +1,22 @@
+## Break
+
+Break statements forces the loop to stop iterating and forces the code onto the next line of text. Here's what a break statement would look like:
+
+``` js
+ let buttontext = "";
+ let i;
+ for (i = 0; i < 10; i++) {
+ if (i === 3) { break; }
+ buttontext += "The number is " + i + " ";
+}
+document.write(buttontext)
+```
+
+
+Instead of printing all nine numbers, the code will print this:
+
+`The number is 0
+The number is 1
+The number is 2`
+
+Because it will `break` when `i===3` and will skip past any of the remaining code.
\ No newline at end of file
From 1e83fc0924993103e5d0505d6f9d7df22b891584 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:37:10 -0800
Subject: [PATCH 051/123] Delete 1.md
---
react_week2_fixed/1.md | 16 ----------------
1 file changed, 16 deletions(-)
delete mode 100644 react_week2_fixed/1.md
diff --git a/react_week2_fixed/1.md b/react_week2_fixed/1.md
deleted file mode 100644
index ee4c11e7..00000000
--- a/react_week2_fixed/1.md
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-# What is JavaScript?
-
-JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
-
-JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
-
-
-
-The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
-
-For instance, the tag goes at the top, and th
-
-
-
From d9fb15c49a03bdffde7a146f1409472892575d18 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:37:20 -0800
Subject: [PATCH 052/123] Delete 10.md
---
react_week2_fixed/10.md | 17 -----------------
1 file changed, 17 deletions(-)
delete mode 100644 react_week2_fixed/10.md
diff --git a/react_week2_fixed/10.md b/react_week2_fixed/10.md
deleted file mode 100644
index 05584372..00000000
--- a/react_week2_fixed/10.md
+++ /dev/null
@@ -1,17 +0,0 @@
-## Continue
-
-Continue values are like the "opposite" of breaks. Instead of breaking out of the loop, they reiterate the function:
-
-``` javascript
- let buttontext = "";
- let i;
- for (i = 0; i < 10; i++) {
- if (i === 3) { continue; }
- buttontext += "The number is " + i + " ";
-}
-document.write(buttontext)
-```
-
-
-The result will skip over 3 until it reaches the end of the loop and then it will contunue to the next code block.
-
From 2e5f5107832010382aab5db5e23dc089c4afe03c Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:37:26 -0800
Subject: [PATCH 053/123] Delete 11.md
---
react_week2_fixed/11.md | 25 -------------------------
1 file changed, 25 deletions(-)
delete mode 100644 react_week2_fixed/11.md
diff --git a/react_week2_fixed/11.md b/react_week2_fixed/11.md
deleted file mode 100644
index b3372a64..00000000
--- a/react_week2_fixed/11.md
+++ /dev/null
@@ -1,25 +0,0 @@
-## Functions
-
-A function in JavaScript is a block of code which is designed to do something. When the function is invoked, the code performs a certain task. In the example below, we want to multiply two numbers.
-
-``` javascript
- let x = buttonFunction(4, 3);
-function buttonFunction(a, b) {
- return a * b;
-}
-```
-
-
-The result will be 12.
-
-When the code hits the `return`, the code will stop executing.
-
-The general format for a function is as follows:
-
-`function name(parameter1, parameter2, parameter3...){`
-
-`code to be executed`
-
-}
-
-Functions are usefull because they can be defined according to our needs and can be used however we see fit.
\ No newline at end of file
From be020a6a090781d610061af3d8032aaf8b5911d5 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:37:34 -0800
Subject: [PATCH 054/123] Delete 12.md
---
react_week2_fixed/12.md | 33 ---------------------------------
1 file changed, 33 deletions(-)
delete mode 100644 react_week2_fixed/12.md
diff --git a/react_week2_fixed/12.md b/react_week2_fixed/12.md
deleted file mode 100644
index d43066ce..00000000
--- a/react_week2_fixed/12.md
+++ /dev/null
@@ -1,33 +0,0 @@
-## Arrow Functions
-
-ES6 introduced "Arrow Functions", which make using functions easier.
-
-Here's the "Hello World!" as how we did it earlier
-
-``` JavaScript
-document.write("Hello World!");
-```
-
-And here's "Hello World!" using a function
-
-``` javascript
- hello = function(){
- return "Hello World!"
- }
-```
-
-And here's "Hello World" using an Arrow Function
-
-``` JavaScript
- hello = () => "Hello World!"
-```
-
-
-Notice that the function got shorter! If the function has one value and has a return function, we can omit the `function` and `return` statement all together.
-
-This provides compactness and clarity to the code.
-
-
-
-
-
From a561d5459c185e514fedf9fafd1674c49675e6cf Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:37:48 -0800
Subject: [PATCH 055/123] Delete 13.md
---
react_week2_fixed/13.md | 40 ----------------------------------------
1 file changed, 40 deletions(-)
delete mode 100644 react_week2_fixed/13.md
diff --git a/react_week2_fixed/13.md b/react_week2_fixed/13.md
deleted file mode 100644
index f8958d47..00000000
--- a/react_week2_fixed/13.md
+++ /dev/null
@@ -1,40 +0,0 @@
-## Objects Basics
-
-Almost all objects in JavaScript are parts of the keyword `Object`. Objects are usually initialized with the `Object()` method.
-
- Objects "inherit" their properties from other objects, often called "object prototypes." This inheritance based on linking prototypes together is known as the "prototype chain." Prototypes are defined by `Object.prototype`
-
-Objects can be thought of as a variable that holds many data types in **name:value** pairs. We can access the data stored in objects by calling the name.
-
-```JavaScript
-let button = {
- name: "color changer",
- text: "this changes colors",
- buttonwords: () => this.name + " " + this.text
- }
-};
-```
-
-We can call the properties in this object in two ways:
-
-```JavaScript
-object.name
-// or
-object['name']
-```
-
-We could call the first name of the `person` variable like this:
-
-```JavaScript
-let call = button.name;
-// or
-let call = button['name'];
-```
-
-We've been using objects and their methods this whole time!
-
-```JavaScript
-document.write("Hello World!")
-```
-
-The `write()` method is modifying the `document` object. Similarly,
\ No newline at end of file
From cfeaf20c2f2609bb36f0acb69948cb60d4791804 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:37:55 -0800
Subject: [PATCH 056/123] Delete 14.md
---
react_week2_fixed/14.md | 35 -----------------------------------
1 file changed, 35 deletions(-)
delete mode 100644 react_week2_fixed/14.md
diff --git a/react_week2_fixed/14.md b/react_week2_fixed/14.md
deleted file mode 100644
index 4119d84c..00000000
--- a/react_week2_fixed/14.md
+++ /dev/null
@@ -1,35 +0,0 @@
-## Objects Advanced
-
-Now that we know how Objects look like in JavaScript, let's constuct our own objects.
-
-``` JavaScript
-let button = {
- color: "blue",
- size: 50,
- content: "click me!"
-}
-```
-
-This method only allows you to create one object. If we want to create several objects, we will want to create an object type.
-
-```javascript
-function button(color, size, content){
- this.color=color;
- this.size=size;
- this.content=content;;
-}
-// the keyword "this" is a reserved keyword which refers to the current object
-// "this" is not a variable and cannot be changed
-```
-
-This is an "object constructor", which takes parameters and allows the assignment to object properties. Now, if we want to create new object, we can use the `new` keyword
-
-```javascript
-function button(color, size, content){
- this.color=color;
- this.size=size;
- this.content=content;;
-}
-let orderbutton= new button("blue",50,"clickme!")
-```
-
From 21b4588ad5d93b79b372053c7f451f998aa38d71 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:38:02 -0800
Subject: [PATCH 057/123] Delete 15.md
---
react_week2_fixed/15.md | 26 --------------------------
1 file changed, 26 deletions(-)
delete mode 100644 react_week2_fixed/15.md
diff --git a/react_week2_fixed/15.md b/react_week2_fixed/15.md
deleted file mode 100644
index b703d39c..00000000
--- a/react_week2_fixed/15.md
+++ /dev/null
@@ -1,26 +0,0 @@
-## Events
-
-Events allow the user to interact with the webpage and is what sets JavaScript apart from other languages.
-
-``` JavaScript
- document.querySelector('html').onclick = function() {
- alert('Now, this is interactivity!');
-```
-
-
-The `querySelector` selects the `` element, setting onclick to a nameless function, which are also called anonymous functions, and generating the alert.
-
-Let's generate another event, one that tells us the date and time:
-
-``` javascript
-function displayDate() {
- document.getElementById("time").innerHTML = Date();
-}
-```
-
-When run, this little bit of code will allow us to generate the time that it currently is using JavaScript. Of course, we're going to need someway to generate the date and time, and for that we would use the button function in HTML. That's going to be your challenge activity.
-
-Here's a common list of events:
-
-
-
From 67e0e6eb1bc275b33df1161dfdce6130ca29619f Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:39:08 -0800
Subject: [PATCH 058/123] Delete 16.md
---
react_week2_fixed/16.md | 32 --------------------------------
1 file changed, 32 deletions(-)
delete mode 100644 react_week2_fixed/16.md
diff --git a/react_week2_fixed/16.md b/react_week2_fixed/16.md
deleted file mode 100644
index fab24a9c..00000000
--- a/react_week2_fixed/16.md
+++ /dev/null
@@ -1,32 +0,0 @@
-## Arrays
-
-JavaScript allows arrays, a special type of object.
-
-This is an example of an array:
-
-`let fruit = ["Mango", "Apple", "Banana"]`
-
-It functions as a list. The easiest way to create an array is
-
-`let array_name = [item1, item2, item3...]`
-
-JS has a keyword named `new` which creates and assigns values to it:
-
-`let fruit = new Array ("Mango", "Apple", Banana)`
-
-To access an item of an array, we reference the **index number**
-
-`let name = fruit[0]` will return the first item in the array, which is "Mango". In JS, indexing starts at "0", meaning that the first item is referenced as 0.
-
-What happens if we want to change an item in an array? We do this:
-
-`fruit[0]=Watermelon` This assigns the first item to the value "Watermelon"
-
-We can use different methods to perform a variety of functions. For instance, the following block will give us the length of the fruit array.
-
-`let x = fruit.length();`
-
-There are several other methods:
-
-
-
From 7d9dbb1268588017a2d64965d526b0bfd7d09c29 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:39:16 -0800
Subject: [PATCH 059/123] Delete 17.md
---
react_week2_fixed/17.md | 22 ----------------------
1 file changed, 22 deletions(-)
delete mode 100644 react_week2_fixed/17.md
diff --git a/react_week2_fixed/17.md b/react_week2_fixed/17.md
deleted file mode 100644
index a199c8c3..00000000
--- a/react_week2_fixed/17.md
+++ /dev/null
@@ -1,22 +0,0 @@
-## .map()
-
-Using the `map()` keyword simplifies the indexing of arrays and returns the value you want.
-Let's assume that you recieve an array with the name and age of several people. However, you only want the ages of the people.
-
-```javascript
-let button = [
- { color: "blue", text: 'click me!' },
- { color: "red", text: 'test button' },
- { color: "black", text: 'generate!' },
- { color: "green", text: 'see results!' }
-];
-// we want the color of the button
-```
-
-You can use `.map()` to return the age of this object.
-
-```javascript
-const buttoncolor = button.map(button => button.color);
-```
-
-`.map` looks through each individual element of an array and returns only what we are looking for.
\ No newline at end of file
From db5ac8401bac79826cfa15f47f3d45336315b7d7 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:39:22 -0800
Subject: [PATCH 060/123] Delete 18.md
---
react_week2_fixed/18.md | 34 ----------------------------------
1 file changed, 34 deletions(-)
delete mode 100644 react_week2_fixed/18.md
diff --git a/react_week2_fixed/18.md b/react_week2_fixed/18.md
deleted file mode 100644
index 2b88bf8c..00000000
--- a/react_week2_fixed/18.md
+++ /dev/null
@@ -1,34 +0,0 @@
-## .reduce()
-
-Just like `.map()`, `.reduce()` looks through all the elements in an array but only returns one value that you want. Let's look at an example:
-
-```javascript
-let button = [
- {
- id: 1,
- text: "1",
- value: 1,
- },
- {
- id: 2,
- text: "+",
- value: 0 ,
- },
- {
- id: 3,
- text: "2",
- value: 2,
- }
-];
-// we want the largest value in this array
-```
-
-Using `.reduce()`, we'll be able to find the oldest person in the array:
-
-```javascript
-let largestvalue = button.reduce(function (largevalue, button) {
- return (largevalue.value || 0) > button.value ? largevalue : button;
-}, {});
-```
-
-Naming the accumulator `largevalue` is a way to check each element in an array. If one value is larger than the other, then that value becomes the new `largevalue`.
\ No newline at end of file
From 2b84a5d0d64f9e5f7563fb3f0b6c6086d271ea54 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:39:30 -0800
Subject: [PATCH 061/123] Delete 19.md
---
react_week2_fixed/19.md | 38 --------------------------------------
1 file changed, 38 deletions(-)
delete mode 100644 react_week2_fixed/19.md
diff --git a/react_week2_fixed/19.md b/react_week2_fixed/19.md
deleted file mode 100644
index 1175ec14..00000000
--- a/react_week2_fixed/19.md
+++ /dev/null
@@ -1,38 +0,0 @@
-## .filter()
-
-`.filter()`, like both `.map()` and `.reduce()` is a way to generate values that you'd want.
-
-```javascript
-let button = [
- {
- id: 1,
- text: "Hi!",
- language: "english" ,
- },
- {
- id: 2,
- text: "Hola!",
- language: "spanish" ,
- },
- {
- id: 3,
- text: "Thanks!",
- language: "english",
- },
- {
- id: 4,
- text: "Gracias!",
- language: "spanish",
- }
-];
-// we want two arrays, one for the button language that is spanish and the other that is english
-```
-
-We'd create the two arrays like this:
-
-```javascript
-const spanish = button.filter(button => button.language === "spanish");
-const english = button.filter(button => button.language === "english");
-```
-
-This checks if the value in `language` returns true for each function, which would place that value in the array.
\ No newline at end of file
From a95ad7ce30e24cb5f204127ea5710a36d544dce6 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:39:38 -0800
Subject: [PATCH 062/123] Delete 2.md
---
react_week2_fixed/2.md | 43 ------------------------------------------
1 file changed, 43 deletions(-)
delete mode 100644 react_week2_fixed/2.md
diff --git a/react_week2_fixed/2.md b/react_week2_fixed/2.md
deleted file mode 100644
index a75a099b..00000000
--- a/react_week2_fixed/2.md
+++ /dev/null
@@ -1,43 +0,0 @@
-## Introduction to JavaScript
-
-JS is written by inserting a "script" tag into the HTML webpage as shown here:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-The script tag can be placed in either the header tag or the body tag.
-
-Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
-
-
-
-
-
-
-
-**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
-
-
-
-
-
-
-
-
-
From dfc8a062edf58239b95cca5fd815cde63ca6385d Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:39:47 -0800
Subject: [PATCH 063/123] Delete 20.md
---
react_week2_fixed/20.md | 5 -----
1 file changed, 5 deletions(-)
delete mode 100644 react_week2_fixed/20.md
diff --git a/react_week2_fixed/20.md b/react_week2_fixed/20.md
deleted file mode 100644
index 9ea0d50a..00000000
--- a/react_week2_fixed/20.md
+++ /dev/null
@@ -1,5 +0,0 @@
-## Button
-
-With our new knowldge of JavaScript, let's make a button which on click, which would do something!
-
-We already used `onClick` to get an alert, so let's try something else.
\ No newline at end of file
From 2781faf8f1a3458efddd33d1ccc746bcb5baa7ba Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:40:04 -0800
Subject: [PATCH 064/123] Delete 3.md
---
react_week2_fixed/3.md | 18 ------------------
1 file changed, 18 deletions(-)
delete mode 100644 react_week2_fixed/3.md
diff --git a/react_week2_fixed/3.md b/react_week2_fixed/3.md
deleted file mode 100644
index 75d70430..00000000
--- a/react_week2_fixed/3.md
+++ /dev/null
@@ -1,18 +0,0 @@
-## External JS
-
-Although the
-
-External JavaScripts can either be put into the head or body part of the DOM. For the rest of the course, we'll be making new files and using external JavaScript in order to initialize the code.
-
-External scripts should not contain the script tag.
\ No newline at end of file
From 482a2d352e6eb56c1a7acf1d465de271b1eee577 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:40:10 -0800
Subject: [PATCH 065/123] Delete 4.md
---
react_week2_fixed/4.md | 24 ------------------------
1 file changed, 24 deletions(-)
delete mode 100644 react_week2_fixed/4.md
diff --git a/react_week2_fixed/4.md b/react_week2_fixed/4.md
deleted file mode 100644
index 5e2a5bf9..00000000
--- a/react_week2_fixed/4.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## The If/Else Statements
-
-Let's examine the first one, the `if` and `else` conditional.
-
-```javascript
-
- let buttonsize = 4;
- if (buttonsize < 5)
- {
- document.write("Button is too small!");
- }
- else
- {
- document.write("Button is too big!");
- }
-```
-
-The above block of code will print `Button is too small!` because the condition that button size<5 is fulfilled.
-
-If buttonsize was equal to or greater than 5 (buttonsize>=5), the `else` statement would have been printed.
-
-What happens if we have more than one condition?
-
-Enter the "else if" condition
\ No newline at end of file
From 588171955b0a8e0e54c3d7fc96420778fad78687 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:40:18 -0800
Subject: [PATCH 066/123] Delete 5.md
---
react_week2_fixed/5.md | 24 ------------------------
1 file changed, 24 deletions(-)
delete mode 100644 react_week2_fixed/5.md
diff --git a/react_week2_fixed/5.md b/react_week2_fixed/5.md
deleted file mode 100644
index dee6f7b7..00000000
--- a/react_week2_fixed/5.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## Else if
-
-The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
-
-``` javascript
-
- let buttonsize = 4;
- if (buttonsize < 5)
- {
- document.write("Button is too small!");
- }
- else if (buttonsize===5)
- {
- alert("Perfect size!");
- }
- else
- {
- document.write("Button is too big!");
- }
-```
-
-
-Recall that `===` is what we use to equate. In this certain block of code, the script would print out `This one's alright` because it is the only condition which is true.
-
From aa5a6ebed8a8382e0068e50f43c18a106928748c Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:40:26 -0800
Subject: [PATCH 067/123] Delete 6.md
---
react_week2_fixed/6.md | 24 ------------------------
1 file changed, 24 deletions(-)
delete mode 100644 react_week2_fixed/6.md
diff --git a/react_week2_fixed/6.md b/react_week2_fixed/6.md
deleted file mode 100644
index 192c3963..00000000
--- a/react_week2_fixed/6.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## Switch
-
-The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
-
-``` javascript
- const fruit = 'Papayas';
-switch (fruit) {
- case 'Oranges':
- document.write('Oranges are $0.59 a pound.');
- break;
- case 'Papayas':
- document.write('Papayas are $2.79 a pound.');
- break;
- default:
- document.write('Sorry, we are out of ' + fruit + '.');
-}
-```
-
-We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
-
-Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
-
-When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
-
From a13e9545f07480179d498cc10ad8e100fe719c1f Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:40:37 -0800
Subject: [PATCH 068/123] Delete 7.md
---
react_week2_fixed/7.md | 25 -------------------------
1 file changed, 25 deletions(-)
delete mode 100644 react_week2_fixed/7.md
diff --git a/react_week2_fixed/7.md b/react_week2_fixed/7.md
deleted file mode 100644
index 7437edeb..00000000
--- a/react_week2_fixed/7.md
+++ /dev/null
@@ -1,25 +0,0 @@
-## For Loops
-
-For loops iterate a certain amount of times, often dictated by the amount of items in an array. Let's look at an example and dissect it from there:
-
-``` javascript
- let buttoncolor = ["Red", "Blue", "Green", "Yellow", "Maroon", "Black"];
- let i;
- for (i = 0; i < buttoncolor.length; i++) {
- document.write(buttoncolor[i] + ", ")
- }
-```
-
-This script will iterate 5 times and will print this: `Red, Blue, Green, Yellow, Maroon, Black`
-
-Recall that arrays start indexing their first item as buttoncolor[0]. This means that buttoncolor[5] becomes `Black`. Hence, we can print all of the array.
-
-The general format of the for loop is as follows:
-
-`for (x,y,z){`
-
-`code to be executed`
-
-`}`
-
-where x is executed once before the code block, y defines the condition to the execution of the code block, and z executes after the code block has been executed.
\ No newline at end of file
From 4dd5082ae4984096b42effd95e897d44543034b1 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:40:44 -0800
Subject: [PATCH 069/123] Delete 8.md
---
react_week2_fixed/8.md | 27 ---------------------------
1 file changed, 27 deletions(-)
delete mode 100644 react_week2_fixed/8.md
diff --git a/react_week2_fixed/8.md b/react_week2_fixed/8.md
deleted file mode 100644
index fbb9e489..00000000
--- a/react_week2_fixed/8.md
+++ /dev/null
@@ -1,27 +0,0 @@
-## While Loops
-
-While loops iterate through the loop for as long as the condition is true. Let's look at an example:
-
-``` javascript
- var buttontext = "";
- var i = 0;
- while (i < 10) {
- buttontext += " The number is " + i;
- i++;
-}
-document.write(buttontext)
-```
-
-This loop iterates 0-9 times, so our result will look like this:
-
-`The number is 0
-The number is 1` and so forth. The while loop iterated until i became 10, and then stopped iterating. The `i++` function adds 1 to i and increments it. `i--` would decrement the code.
-
-The general format of the while loop is as follows:
-
-`while (condition) {`
-
-`code to be executed`
-
-`}`
-
From 27c40482559291abacea1d48c5bb7d15512ffe9b Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:40:54 -0800
Subject: [PATCH 070/123] Delete 9.md
---
react_week2_fixed/9.md | 22 ----------------------
1 file changed, 22 deletions(-)
delete mode 100644 react_week2_fixed/9.md
diff --git a/react_week2_fixed/9.md b/react_week2_fixed/9.md
deleted file mode 100644
index fc180c9d..00000000
--- a/react_week2_fixed/9.md
+++ /dev/null
@@ -1,22 +0,0 @@
-## Break
-
-Break statements forces the loop to stop iterating and forces the code onto the next line of text. Here's what a break statement would look like:
-
-``` js
- let buttontext = "";
- let i;
- for (i = 0; i < 10; i++) {
- if (i === 3) { break; }
- buttontext += "The number is " + i + " ";
-}
-document.write(buttontext)
-```
-
-
-Instead of printing all nine numbers, the code will print this:
-
-`The number is 0
-The number is 1
-The number is 2`
-
-Because it will `break` when `i===3` and will skip past any of the remaining code.
\ No newline at end of file
From 7e42e06c4c9eef93e2a5ac288209c4dce0c7eda0 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:42:21 -0800
Subject: [PATCH 071/123] Add files via upload
---
1.md | 16 ++++++++++++++++
10.md | 30 ++++++++++++++++++++++++++++++
11.md | 37 +++++++++++++++++++++++++++++++++++++
12.md | 41 +++++++++++++++++++++++++++++++++++++++++
13.md | 40 ++++++++++++++++++++++++++++++++++++++++
14.md | 37 +++++++++++++++++++++++++++++++++++++
15.md | 27 +++++++++++++++++++++++++++
16.md | 32 ++++++++++++++++++++++++++++++++
17.md | 24 ++++++++++++++++++++++++
18.md | 36 ++++++++++++++++++++++++++++++++++++
19.md | 38 ++++++++++++++++++++++++++++++++++++++
2.md | 43 +++++++++++++++++++++++++++++++++++++++++++
20.md | 29 +++++++++++++++++++++++++++++
3.md | 18 ++++++++++++++++++
4.md | 24 ++++++++++++++++++++++++
5.md | 25 +++++++++++++++++++++++++
6.md | 24 ++++++++++++++++++++++++
7.md | 37 +++++++++++++++++++++++++++++++++++++
8.md | 36 ++++++++++++++++++++++++++++++++++++
9.md | 22 ++++++++++++++++++++++
20 files changed, 616 insertions(+)
create mode 100644 1.md
create mode 100644 10.md
create mode 100644 11.md
create mode 100644 12.md
create mode 100644 13.md
create mode 100644 14.md
create mode 100644 15.md
create mode 100644 16.md
create mode 100644 17.md
create mode 100644 18.md
create mode 100644 19.md
create mode 100644 2.md
create mode 100644 20.md
create mode 100644 3.md
create mode 100644 4.md
create mode 100644 5.md
create mode 100644 6.md
create mode 100644 7.md
create mode 100644 8.md
create mode 100644 9.md
diff --git a/1.md b/1.md
new file mode 100644
index 00000000..ee4c11e7
--- /dev/null
+++ b/1.md
@@ -0,0 +1,16 @@
+
+
+# What is JavaScript?
+
+JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
+
+JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
+
+
+
+The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
+
+For instance, the tag goes at the top, and th
+
+
+
diff --git a/10.md b/10.md
new file mode 100644
index 00000000..a0cbfa00
--- /dev/null
+++ b/10.md
@@ -0,0 +1,30 @@
+## Continue
+
+Continue values are like the "opposite" of breaks. Instead of breaking out of the loop, they reiterate the function:
+
+``` javascript
+ let buttontext = "";
+ let i;
+ for (i = 0; i < 10; i++) {
+ if (i === 3) { continue; }
+ buttontext += "The number is " + i + " ";
+}
+document.write(buttontext)
+```
+
+
+The result will skip over 3 until it reaches the end of the loop and then it will contunue to the next code block.
+
+What would this print?
+
+```javascript
+ let buttonsize = "";
+ let x;
+ for (x = 2; x < 10; i++) {
+ if (x === 2) { continue; }
+ buttonsize += x + " ";
+}
+document.write(buttonsize)
+```
+
+This would end up skipping the first value
\ No newline at end of file
diff --git a/11.md b/11.md
new file mode 100644
index 00000000..eaf6544e
--- /dev/null
+++ b/11.md
@@ -0,0 +1,37 @@
+## Functions
+
+A function in JavaScript is a block of code which is designed to do something. When the function is invoked, the code performs a certain task. In the example below, we want to multiply two numbers.
+
+``` javascript
+ let x = buttonFunction(4, 3);
+function buttonFunction(a, b) {
+ return a * b;
+}
+```
+
+
+The result will be 12.
+
+When the code hits the `return`, the code will stop executing.
+
+The general format for a function is as follows:
+
+`function name(parameter1, parameter2, parameter3...){`
+
+`code to be executed`
+
+}
+
+Functions are usefull because they can be defined according to our needs and can be used however we see fit.
+
+Make your own function which adds two numbers!
+
+Answer:
+
+```javascript
+let x = buttonAdd(30,50)
+function buttonAdd(a,b){
+ return a+b;
+}
+```
+
diff --git a/12.md b/12.md
new file mode 100644
index 00000000..2caf7bf8
--- /dev/null
+++ b/12.md
@@ -0,0 +1,41 @@
+## Arrow Functions
+
+ES6 introduced "Arrow Functions", which make using functions easier.
+
+Here's the "Hello World!" as how we did it earlier
+
+``` JavaScript
+document.write("Hello World!");
+```
+
+And here's "Hello World!" using a function
+
+``` javascript
+ hello = function(){
+ return "Hello World!"
+ }
+```
+
+And here's "Hello World" using an Arrow Function
+
+``` JavaScript
+ hello = () => "Hello World!"
+```
+
+
+Notice that the function got shorter. If the function has one value and has a return function, we can omit the `function` and `return` statement all together.
+
+This provides compactness and clarity to the code.
+
+Let's write this function as an arrow function:
+
+```javascript
+let addition = function (x,y){
+ return x+y
+}
+```
+
+
+
+
+
diff --git a/13.md b/13.md
new file mode 100644
index 00000000..25564b00
--- /dev/null
+++ b/13.md
@@ -0,0 +1,40 @@
+## Objects Basics
+
+Almost all objects in JavaScript are parts of the keyword `Object`. Objects are usually initialized with the `Object()` method.
+
+ Objects "inherit" their properties from other objects, often called "object prototypes." This inheritance based on linking prototypes together is known as the "prototype chain." Prototypes are defined by `Object.prototype`
+
+Objects can be thought of as a variable that holds many data types in **name:value** pairs. We can access the data stored in objects by calling the name.
+
+```JavaScript
+let button = {
+ name: "color changer",
+ text: "this changes colors",
+ buttonwords: () => this.name + " " + this.text
+ }
+};
+```
+
+We can call the properties in this object in two ways:
+
+```JavaScript
+object.name
+// or
+object['name']
+```
+
+We could call the first name of the `person` variable like this:
+
+```JavaScript
+let call = button.name;
+// or
+let call = button['name'];
+```
+
+We've been using objects and their methods this whole time!
+
+```JavaScript
+document.write("Hello World!")
+```
+
+The `write()` method is modifying the `document` object.
\ No newline at end of file
diff --git a/14.md b/14.md
new file mode 100644
index 00000000..a93d1ab2
--- /dev/null
+++ b/14.md
@@ -0,0 +1,37 @@
+## Objects Advanced
+
+Now that we know how Objects look like in JavaScript, let's constuct our own objects.
+
+``` JavaScript
+let button = {
+ color: "blue",
+ size: 50,
+ content: "click me!"
+}
+```
+
+This method only allows you to create one object. If we want to create several objects, we will want to create an object type.
+
+```javascript
+function button(color, size, content){
+ this.color=color;
+ this.size=size;
+ this.content=content;;
+}
+// the keyword "this" is a reserved keyword which refers to the current object
+// "this" is not a variable and cannot be changed
+```
+
+This is an "object constructor", which takes parameters and allows the assignment to object properties. Now, if we want to create new object, we can use the `new` keyword
+
+```javascript
+function button(color, size, content){
+ this.color=color;
+ this.size=size;
+ this.content=content;;
+}
+let orderbutton= new button("blue",50,"clickme!")
+```
+
+Let's make an object `button` which has three elements: font size, font, and color.
+
diff --git a/15.md b/15.md
new file mode 100644
index 00000000..dbdbae5b
--- /dev/null
+++ b/15.md
@@ -0,0 +1,27 @@
+## Events
+
+Events allow the user to interact with the webpage and is what sets JavaScript apart from other languages.
+
+``` JavaScript
+ document.querySelector('html').onclick = function() {
+ alert('Now, this is interactivity!');
+```
+
+
+The `querySelector` selects the `` element, setting onclick to a nameless function, which are also called anonymous functions, and generating the alert.
+
+Let's generate another event, one that tells us the date and time:
+
+``` javascript
+function displayDate() {
+ document.getElementById("time").innerHTML = Date();
+}
+```
+
+When run, this little bit of code will allow us to generate the time that it currently is using JavaScript. Of course, we're going to need someway to generate the date and time, and for that we would use the button function in HTML. That's going to be your challenge activity.
+
+Here's a common list of events:
+
+
+
+Construct an event which, on mouseover, will perform an `alert()`
\ No newline at end of file
diff --git a/16.md b/16.md
new file mode 100644
index 00000000..fab24a9c
--- /dev/null
+++ b/16.md
@@ -0,0 +1,32 @@
+## Arrays
+
+JavaScript allows arrays, a special type of object.
+
+This is an example of an array:
+
+`let fruit = ["Mango", "Apple", "Banana"]`
+
+It functions as a list. The easiest way to create an array is
+
+`let array_name = [item1, item2, item3...]`
+
+JS has a keyword named `new` which creates and assigns values to it:
+
+`let fruit = new Array ("Mango", "Apple", Banana)`
+
+To access an item of an array, we reference the **index number**
+
+`let name = fruit[0]` will return the first item in the array, which is "Mango". In JS, indexing starts at "0", meaning that the first item is referenced as 0.
+
+What happens if we want to change an item in an array? We do this:
+
+`fruit[0]=Watermelon` This assigns the first item to the value "Watermelon"
+
+We can use different methods to perform a variety of functions. For instance, the following block will give us the length of the fruit array.
+
+`let x = fruit.length();`
+
+There are several other methods:
+
+
+
diff --git a/17.md b/17.md
new file mode 100644
index 00000000..236588f7
--- /dev/null
+++ b/17.md
@@ -0,0 +1,24 @@
+## .map()
+
+Using the `map()` keyword simplifies the indexing of arrays and returns the value you want.
+Let's assume that you recieve an array with the name and age of several people. However, you only want the ages of the people.
+
+```javascript
+let button = [
+ { color: "blue", text: 'click me!' },
+ { color: "red", text: 'test button' },
+ { color: "black", text: 'generate!' },
+ { color: "green", text: 'see results!' }
+];
+// we want the color of the button
+```
+
+You can use `.map()` to return the color of this object.
+
+```javascript
+const buttoncolor = button.map(button => button.color);
+```
+
+`.map` looks through each individual element of an array and returns only what we are looking for.
+
+Write a `.map()` function to return the text in this object.
\ No newline at end of file
diff --git a/18.md b/18.md
new file mode 100644
index 00000000..d8415422
--- /dev/null
+++ b/18.md
@@ -0,0 +1,36 @@
+## .reduce()
+
+Just like `.map()`, `.reduce()` looks through all the elements in an array but only returns one value that you want. Let's look at an example:
+
+```javascript
+let button = [
+ {
+ id: 1,
+ text: "1",
+ value: 1,
+ },
+ {
+ id: 2,
+ text: "+",
+ value: 0 ,
+ },
+ {
+ id: 3,
+ text: "2",
+ value: 2,
+ }
+];
+// we want the largest value in this array
+```
+
+Using `.reduce()`, we'll be able to find the oldest person in the array:
+
+```javascript
+let largestvalue = button.reduce(function (largevalue, button) {
+ return (largevalue.value || 0) > button.value ? largevalue : button;
+}, {});
+```
+
+Naming the accumulator `largevalue` is a way to check each element in an array. If one value is larger than the other, then that value becomes the new `largevalue`.
+
+Use `.reduce()` to find the youngest person in the array.
\ No newline at end of file
diff --git a/19.md b/19.md
new file mode 100644
index 00000000..1175ec14
--- /dev/null
+++ b/19.md
@@ -0,0 +1,38 @@
+## .filter()
+
+`.filter()`, like both `.map()` and `.reduce()` is a way to generate values that you'd want.
+
+```javascript
+let button = [
+ {
+ id: 1,
+ text: "Hi!",
+ language: "english" ,
+ },
+ {
+ id: 2,
+ text: "Hola!",
+ language: "spanish" ,
+ },
+ {
+ id: 3,
+ text: "Thanks!",
+ language: "english",
+ },
+ {
+ id: 4,
+ text: "Gracias!",
+ language: "spanish",
+ }
+];
+// we want two arrays, one for the button language that is spanish and the other that is english
+```
+
+We'd create the two arrays like this:
+
+```javascript
+const spanish = button.filter(button => button.language === "spanish");
+const english = button.filter(button => button.language === "english");
+```
+
+This checks if the value in `language` returns true for each function, which would place that value in the array.
\ No newline at end of file
diff --git a/2.md b/2.md
new file mode 100644
index 00000000..a75a099b
--- /dev/null
+++ b/2.md
@@ -0,0 +1,43 @@
+## Introduction to JavaScript
+
+JS is written by inserting a "script" tag into the HTML webpage as shown here:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+The script tag can be placed in either the header tag or the body tag.
+
+Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
+
+
+
+
+
+
+
+**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
+
+
+
+
+
+
+
+
+
diff --git a/20.md b/20.md
new file mode 100644
index 00000000..21a134d6
--- /dev/null
+++ b/20.md
@@ -0,0 +1,29 @@
+## Button
+
+With our new knowldge of JavaScript and HTML, let's make a button which on click, which would change colors!
+
+This is one way we can do it:
+
+```html
+
+
+
+```
+
+This is how the button would look like before clicking it:
+
+
+
+And this is the button after it is clicked:
+
+
+
+Let's make another button, which upon mousover, will change colors.
\ No newline at end of file
diff --git a/3.md b/3.md
new file mode 100644
index 00000000..75d70430
--- /dev/null
+++ b/3.md
@@ -0,0 +1,18 @@
+## External JS
+
+Although the
+
+External JavaScripts can either be put into the head or body part of the DOM. For the rest of the course, we'll be making new files and using external JavaScript in order to initialize the code.
+
+External scripts should not contain the script tag.
\ No newline at end of file
diff --git a/4.md b/4.md
new file mode 100644
index 00000000..fedda1e8
--- /dev/null
+++ b/4.md
@@ -0,0 +1,24 @@
+## The If/Else Statements
+
+Let's examine the first one, the `if` and `else` conditional.
+
+```javascript
+
+ let buttonsize = 4;
+ if (buttonsize < 5)
+ {
+ document.write("Button is too small!");
+ }
+ else
+ {
+ document.write("Button is too big!");
+ }
+```
+
+The if/else statemenent checks the condition and then does whatever the specific condition we make it do.
+
+What does the above code block do?
+
+What happens if we have more than one condition?
+
+Enter the "else if" condition
\ No newline at end of file
diff --git a/5.md b/5.md
new file mode 100644
index 00000000..c998af0e
--- /dev/null
+++ b/5.md
@@ -0,0 +1,25 @@
+## Else if
+
+The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
+
+``` javascript
+
+ let buttonsize = 4;
+ if (buttonsize < 5)
+ {
+ document.write("Button is too small!");
+ }
+ else if (buttonsize===5)
+ {
+ alert("Perfect size!");
+ }
+ else
+ {
+ document.write("Button is too big!");
+ }
+```
+
+Recall that `===` is what we use to equate. What does this code block do?
+
+Write an if/else statement which checks to see if button font is bigger than 32 pp, and if it is, it will print("this is large"). However, otherwise, the code will print("this is small!")
+
diff --git a/6.md b/6.md
new file mode 100644
index 00000000..192c3963
--- /dev/null
+++ b/6.md
@@ -0,0 +1,24 @@
+## Switch
+
+The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
+
+``` javascript
+ const fruit = 'Papayas';
+switch (fruit) {
+ case 'Oranges':
+ document.write('Oranges are $0.59 a pound.');
+ break;
+ case 'Papayas':
+ document.write('Papayas are $2.79 a pound.');
+ break;
+ default:
+ document.write('Sorry, we are out of ' + fruit + '.');
+}
+```
+
+We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
+
+Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
+
+When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
+
diff --git a/7.md b/7.md
new file mode 100644
index 00000000..4aceec5d
--- /dev/null
+++ b/7.md
@@ -0,0 +1,37 @@
+## For Loops
+
+For loops iterate a certain amount of times, often dictated by the amount of items in an array. Let's look at an example and dissect it from there:
+
+``` javascript
+ let buttoncolor = ["Red", "Blue", "Green", "Yellow", "Maroon", "Black"];
+ let i;
+ for (i = 0; i < buttoncolor.length; i++) {
+ document.write(buttoncolor[i] + ", ")
+ }
+```
+
+This script will iterate 5 times and will print this: `Red, Blue, Green, Yellow, Maroon, Black`
+
+Recall that arrays start indexing their first item as buttoncolor[0]. This means that buttoncolor[5] becomes `Black`. Hence, we can print all of the array.
+
+The general format of the for loop is as follows:
+
+`for (x,y,z){`
+
+`code to be executed`
+
+`}`
+
+where x is executed once before the code block, y defines the condition to the execution of the code block, and z executes after the code block has been executed.
+
+What will this print?
+
+```javascript
+let buttonsizes=["10","20","30","40"];
+let x;
+for (x=2; x<3; x++){
+ document.write(buttonsizes[i]+",")
+}
+```
+
+Remember that the first value in JavaScript is actually 0!
\ No newline at end of file
diff --git a/8.md b/8.md
new file mode 100644
index 00000000..be9624f4
--- /dev/null
+++ b/8.md
@@ -0,0 +1,36 @@
+## While Loops
+
+While loops iterate through the loop for as long as the condition is true. Let's look at an example:
+
+``` javascript
+ let buttontext = "";
+ let i = 0;
+ while (i < 10) {
+ buttontext += " The number is " + i;
+ i++;
+}
+document.write(buttontext)
+```
+
+This loop iterates 0-9 times, so our result will look like this:
+
+`The number is 0
+The number is 1` and so forth. The while loop iterated until i became 10, and then stopped iterating. The `i++` function adds 1 to i and increments it. `i--` would decrement the code.
+
+The general format of the while loop is as follows:
+
+`while (condition) {`
+
+`code to be executed`
+
+`}`
+
+What would this print?
+
+```javascript
+let button="";
+let x=0;
+while(x<10){
+ document.write(x)
+}
+```
\ No newline at end of file
diff --git a/9.md b/9.md
new file mode 100644
index 00000000..fc180c9d
--- /dev/null
+++ b/9.md
@@ -0,0 +1,22 @@
+## Break
+
+Break statements forces the loop to stop iterating and forces the code onto the next line of text. Here's what a break statement would look like:
+
+``` js
+ let buttontext = "";
+ let i;
+ for (i = 0; i < 10; i++) {
+ if (i === 3) { break; }
+ buttontext += "The number is " + i + " ";
+}
+document.write(buttontext)
+```
+
+
+Instead of printing all nine numbers, the code will print this:
+
+`The number is 0
+The number is 1
+The number is 2`
+
+Because it will `break` when `i===3` and will skip past any of the remaining code.
\ No newline at end of file
From 6368c9fa7346c17954d7af20aa0f40a4411638e5 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Wed, 26 Feb 2020 21:43:16 -0800
Subject: [PATCH 072/123] Add files via upload
---
react_week2_fixed/1.md | 16 +++++++++++++++
react_week2_fixed/10.md | 30 ++++++++++++++++++++++++++++
react_week2_fixed/11.md | 37 +++++++++++++++++++++++++++++++++++
react_week2_fixed/12.md | 41 +++++++++++++++++++++++++++++++++++++++
react_week2_fixed/13.md | 40 ++++++++++++++++++++++++++++++++++++++
react_week2_fixed/14.md | 37 +++++++++++++++++++++++++++++++++++
react_week2_fixed/15.md | 27 ++++++++++++++++++++++++++
react_week2_fixed/16.md | 32 ++++++++++++++++++++++++++++++
react_week2_fixed/17.md | 24 +++++++++++++++++++++++
react_week2_fixed/18.md | 36 ++++++++++++++++++++++++++++++++++
react_week2_fixed/19.md | 38 ++++++++++++++++++++++++++++++++++++
react_week2_fixed/2.md | 43 +++++++++++++++++++++++++++++++++++++++++
react_week2_fixed/20.md | 29 +++++++++++++++++++++++++++
react_week2_fixed/3.md | 18 +++++++++++++++++
react_week2_fixed/4.md | 24 +++++++++++++++++++++++
react_week2_fixed/5.md | 25 ++++++++++++++++++++++++
react_week2_fixed/6.md | 24 +++++++++++++++++++++++
react_week2_fixed/7.md | 37 +++++++++++++++++++++++++++++++++++
react_week2_fixed/8.md | 36 ++++++++++++++++++++++++++++++++++
react_week2_fixed/9.md | 22 +++++++++++++++++++++
20 files changed, 616 insertions(+)
create mode 100644 react_week2_fixed/1.md
create mode 100644 react_week2_fixed/10.md
create mode 100644 react_week2_fixed/11.md
create mode 100644 react_week2_fixed/12.md
create mode 100644 react_week2_fixed/13.md
create mode 100644 react_week2_fixed/14.md
create mode 100644 react_week2_fixed/15.md
create mode 100644 react_week2_fixed/16.md
create mode 100644 react_week2_fixed/17.md
create mode 100644 react_week2_fixed/18.md
create mode 100644 react_week2_fixed/19.md
create mode 100644 react_week2_fixed/2.md
create mode 100644 react_week2_fixed/20.md
create mode 100644 react_week2_fixed/3.md
create mode 100644 react_week2_fixed/4.md
create mode 100644 react_week2_fixed/5.md
create mode 100644 react_week2_fixed/6.md
create mode 100644 react_week2_fixed/7.md
create mode 100644 react_week2_fixed/8.md
create mode 100644 react_week2_fixed/9.md
diff --git a/react_week2_fixed/1.md b/react_week2_fixed/1.md
new file mode 100644
index 00000000..ee4c11e7
--- /dev/null
+++ b/react_week2_fixed/1.md
@@ -0,0 +1,16 @@
+
+
+# What is JavaScript?
+
+JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
+
+JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
+
+
+
+The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
+
+For instance, the tag goes at the top, and th
+
+
+
diff --git a/react_week2_fixed/10.md b/react_week2_fixed/10.md
new file mode 100644
index 00000000..a0cbfa00
--- /dev/null
+++ b/react_week2_fixed/10.md
@@ -0,0 +1,30 @@
+## Continue
+
+Continue values are like the "opposite" of breaks. Instead of breaking out of the loop, they reiterate the function:
+
+``` javascript
+ let buttontext = "";
+ let i;
+ for (i = 0; i < 10; i++) {
+ if (i === 3) { continue; }
+ buttontext += "The number is " + i + " ";
+}
+document.write(buttontext)
+```
+
+
+The result will skip over 3 until it reaches the end of the loop and then it will contunue to the next code block.
+
+What would this print?
+
+```javascript
+ let buttonsize = "";
+ let x;
+ for (x = 2; x < 10; i++) {
+ if (x === 2) { continue; }
+ buttonsize += x + " ";
+}
+document.write(buttonsize)
+```
+
+This would end up skipping the first value
\ No newline at end of file
diff --git a/react_week2_fixed/11.md b/react_week2_fixed/11.md
new file mode 100644
index 00000000..eaf6544e
--- /dev/null
+++ b/react_week2_fixed/11.md
@@ -0,0 +1,37 @@
+## Functions
+
+A function in JavaScript is a block of code which is designed to do something. When the function is invoked, the code performs a certain task. In the example below, we want to multiply two numbers.
+
+``` javascript
+ let x = buttonFunction(4, 3);
+function buttonFunction(a, b) {
+ return a * b;
+}
+```
+
+
+The result will be 12.
+
+When the code hits the `return`, the code will stop executing.
+
+The general format for a function is as follows:
+
+`function name(parameter1, parameter2, parameter3...){`
+
+`code to be executed`
+
+}
+
+Functions are usefull because they can be defined according to our needs and can be used however we see fit.
+
+Make your own function which adds two numbers!
+
+Answer:
+
+```javascript
+let x = buttonAdd(30,50)
+function buttonAdd(a,b){
+ return a+b;
+}
+```
+
diff --git a/react_week2_fixed/12.md b/react_week2_fixed/12.md
new file mode 100644
index 00000000..2caf7bf8
--- /dev/null
+++ b/react_week2_fixed/12.md
@@ -0,0 +1,41 @@
+## Arrow Functions
+
+ES6 introduced "Arrow Functions", which make using functions easier.
+
+Here's the "Hello World!" as how we did it earlier
+
+``` JavaScript
+document.write("Hello World!");
+```
+
+And here's "Hello World!" using a function
+
+``` javascript
+ hello = function(){
+ return "Hello World!"
+ }
+```
+
+And here's "Hello World" using an Arrow Function
+
+``` JavaScript
+ hello = () => "Hello World!"
+```
+
+
+Notice that the function got shorter. If the function has one value and has a return function, we can omit the `function` and `return` statement all together.
+
+This provides compactness and clarity to the code.
+
+Let's write this function as an arrow function:
+
+```javascript
+let addition = function (x,y){
+ return x+y
+}
+```
+
+
+
+
+
diff --git a/react_week2_fixed/13.md b/react_week2_fixed/13.md
new file mode 100644
index 00000000..25564b00
--- /dev/null
+++ b/react_week2_fixed/13.md
@@ -0,0 +1,40 @@
+## Objects Basics
+
+Almost all objects in JavaScript are parts of the keyword `Object`. Objects are usually initialized with the `Object()` method.
+
+ Objects "inherit" their properties from other objects, often called "object prototypes." This inheritance based on linking prototypes together is known as the "prototype chain." Prototypes are defined by `Object.prototype`
+
+Objects can be thought of as a variable that holds many data types in **name:value** pairs. We can access the data stored in objects by calling the name.
+
+```JavaScript
+let button = {
+ name: "color changer",
+ text: "this changes colors",
+ buttonwords: () => this.name + " " + this.text
+ }
+};
+```
+
+We can call the properties in this object in two ways:
+
+```JavaScript
+object.name
+// or
+object['name']
+```
+
+We could call the first name of the `person` variable like this:
+
+```JavaScript
+let call = button.name;
+// or
+let call = button['name'];
+```
+
+We've been using objects and their methods this whole time!
+
+```JavaScript
+document.write("Hello World!")
+```
+
+The `write()` method is modifying the `document` object.
\ No newline at end of file
diff --git a/react_week2_fixed/14.md b/react_week2_fixed/14.md
new file mode 100644
index 00000000..a93d1ab2
--- /dev/null
+++ b/react_week2_fixed/14.md
@@ -0,0 +1,37 @@
+## Objects Advanced
+
+Now that we know how Objects look like in JavaScript, let's constuct our own objects.
+
+``` JavaScript
+let button = {
+ color: "blue",
+ size: 50,
+ content: "click me!"
+}
+```
+
+This method only allows you to create one object. If we want to create several objects, we will want to create an object type.
+
+```javascript
+function button(color, size, content){
+ this.color=color;
+ this.size=size;
+ this.content=content;;
+}
+// the keyword "this" is a reserved keyword which refers to the current object
+// "this" is not a variable and cannot be changed
+```
+
+This is an "object constructor", which takes parameters and allows the assignment to object properties. Now, if we want to create new object, we can use the `new` keyword
+
+```javascript
+function button(color, size, content){
+ this.color=color;
+ this.size=size;
+ this.content=content;;
+}
+let orderbutton= new button("blue",50,"clickme!")
+```
+
+Let's make an object `button` which has three elements: font size, font, and color.
+
diff --git a/react_week2_fixed/15.md b/react_week2_fixed/15.md
new file mode 100644
index 00000000..dbdbae5b
--- /dev/null
+++ b/react_week2_fixed/15.md
@@ -0,0 +1,27 @@
+## Events
+
+Events allow the user to interact with the webpage and is what sets JavaScript apart from other languages.
+
+``` JavaScript
+ document.querySelector('html').onclick = function() {
+ alert('Now, this is interactivity!');
+```
+
+
+The `querySelector` selects the `` element, setting onclick to a nameless function, which are also called anonymous functions, and generating the alert.
+
+Let's generate another event, one that tells us the date and time:
+
+``` javascript
+function displayDate() {
+ document.getElementById("time").innerHTML = Date();
+}
+```
+
+When run, this little bit of code will allow us to generate the time that it currently is using JavaScript. Of course, we're going to need someway to generate the date and time, and for that we would use the button function in HTML. That's going to be your challenge activity.
+
+Here's a common list of events:
+
+
+
+Construct an event which, on mouseover, will perform an `alert()`
\ No newline at end of file
diff --git a/react_week2_fixed/16.md b/react_week2_fixed/16.md
new file mode 100644
index 00000000..fab24a9c
--- /dev/null
+++ b/react_week2_fixed/16.md
@@ -0,0 +1,32 @@
+## Arrays
+
+JavaScript allows arrays, a special type of object.
+
+This is an example of an array:
+
+`let fruit = ["Mango", "Apple", "Banana"]`
+
+It functions as a list. The easiest way to create an array is
+
+`let array_name = [item1, item2, item3...]`
+
+JS has a keyword named `new` which creates and assigns values to it:
+
+`let fruit = new Array ("Mango", "Apple", Banana)`
+
+To access an item of an array, we reference the **index number**
+
+`let name = fruit[0]` will return the first item in the array, which is "Mango". In JS, indexing starts at "0", meaning that the first item is referenced as 0.
+
+What happens if we want to change an item in an array? We do this:
+
+`fruit[0]=Watermelon` This assigns the first item to the value "Watermelon"
+
+We can use different methods to perform a variety of functions. For instance, the following block will give us the length of the fruit array.
+
+`let x = fruit.length();`
+
+There are several other methods:
+
+
+
diff --git a/react_week2_fixed/17.md b/react_week2_fixed/17.md
new file mode 100644
index 00000000..236588f7
--- /dev/null
+++ b/react_week2_fixed/17.md
@@ -0,0 +1,24 @@
+## .map()
+
+Using the `map()` keyword simplifies the indexing of arrays and returns the value you want.
+Let's assume that you recieve an array with the name and age of several people. However, you only want the ages of the people.
+
+```javascript
+let button = [
+ { color: "blue", text: 'click me!' },
+ { color: "red", text: 'test button' },
+ { color: "black", text: 'generate!' },
+ { color: "green", text: 'see results!' }
+];
+// we want the color of the button
+```
+
+You can use `.map()` to return the color of this object.
+
+```javascript
+const buttoncolor = button.map(button => button.color);
+```
+
+`.map` looks through each individual element of an array and returns only what we are looking for.
+
+Write a `.map()` function to return the text in this object.
\ No newline at end of file
diff --git a/react_week2_fixed/18.md b/react_week2_fixed/18.md
new file mode 100644
index 00000000..d8415422
--- /dev/null
+++ b/react_week2_fixed/18.md
@@ -0,0 +1,36 @@
+## .reduce()
+
+Just like `.map()`, `.reduce()` looks through all the elements in an array but only returns one value that you want. Let's look at an example:
+
+```javascript
+let button = [
+ {
+ id: 1,
+ text: "1",
+ value: 1,
+ },
+ {
+ id: 2,
+ text: "+",
+ value: 0 ,
+ },
+ {
+ id: 3,
+ text: "2",
+ value: 2,
+ }
+];
+// we want the largest value in this array
+```
+
+Using `.reduce()`, we'll be able to find the oldest person in the array:
+
+```javascript
+let largestvalue = button.reduce(function (largevalue, button) {
+ return (largevalue.value || 0) > button.value ? largevalue : button;
+}, {});
+```
+
+Naming the accumulator `largevalue` is a way to check each element in an array. If one value is larger than the other, then that value becomes the new `largevalue`.
+
+Use `.reduce()` to find the youngest person in the array.
\ No newline at end of file
diff --git a/react_week2_fixed/19.md b/react_week2_fixed/19.md
new file mode 100644
index 00000000..1175ec14
--- /dev/null
+++ b/react_week2_fixed/19.md
@@ -0,0 +1,38 @@
+## .filter()
+
+`.filter()`, like both `.map()` and `.reduce()` is a way to generate values that you'd want.
+
+```javascript
+let button = [
+ {
+ id: 1,
+ text: "Hi!",
+ language: "english" ,
+ },
+ {
+ id: 2,
+ text: "Hola!",
+ language: "spanish" ,
+ },
+ {
+ id: 3,
+ text: "Thanks!",
+ language: "english",
+ },
+ {
+ id: 4,
+ text: "Gracias!",
+ language: "spanish",
+ }
+];
+// we want two arrays, one for the button language that is spanish and the other that is english
+```
+
+We'd create the two arrays like this:
+
+```javascript
+const spanish = button.filter(button => button.language === "spanish");
+const english = button.filter(button => button.language === "english");
+```
+
+This checks if the value in `language` returns true for each function, which would place that value in the array.
\ No newline at end of file
diff --git a/react_week2_fixed/2.md b/react_week2_fixed/2.md
new file mode 100644
index 00000000..a75a099b
--- /dev/null
+++ b/react_week2_fixed/2.md
@@ -0,0 +1,43 @@
+## Introduction to JavaScript
+
+JS is written by inserting a "script" tag into the HTML webpage as shown here:
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+The script tag can be placed in either the header tag or the body tag.
+
+Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
+
+
+
+
+
+
+
+**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
+
+
+
+
+
+
+
+
+
diff --git a/react_week2_fixed/20.md b/react_week2_fixed/20.md
new file mode 100644
index 00000000..21a134d6
--- /dev/null
+++ b/react_week2_fixed/20.md
@@ -0,0 +1,29 @@
+## Button
+
+With our new knowldge of JavaScript and HTML, let's make a button which on click, which would change colors!
+
+This is one way we can do it:
+
+```html
+
+
+
+```
+
+This is how the button would look like before clicking it:
+
+
+
+And this is the button after it is clicked:
+
+
+
+Let's make another button, which upon mousover, will change colors.
\ No newline at end of file
diff --git a/react_week2_fixed/3.md b/react_week2_fixed/3.md
new file mode 100644
index 00000000..75d70430
--- /dev/null
+++ b/react_week2_fixed/3.md
@@ -0,0 +1,18 @@
+## External JS
+
+Although the
+
+External JavaScripts can either be put into the head or body part of the DOM. For the rest of the course, we'll be making new files and using external JavaScript in order to initialize the code.
+
+External scripts should not contain the script tag.
\ No newline at end of file
diff --git a/react_week2_fixed/4.md b/react_week2_fixed/4.md
new file mode 100644
index 00000000..fedda1e8
--- /dev/null
+++ b/react_week2_fixed/4.md
@@ -0,0 +1,24 @@
+## The If/Else Statements
+
+Let's examine the first one, the `if` and `else` conditional.
+
+```javascript
+
+ let buttonsize = 4;
+ if (buttonsize < 5)
+ {
+ document.write("Button is too small!");
+ }
+ else
+ {
+ document.write("Button is too big!");
+ }
+```
+
+The if/else statemenent checks the condition and then does whatever the specific condition we make it do.
+
+What does the above code block do?
+
+What happens if we have more than one condition?
+
+Enter the "else if" condition
\ No newline at end of file
diff --git a/react_week2_fixed/5.md b/react_week2_fixed/5.md
new file mode 100644
index 00000000..c998af0e
--- /dev/null
+++ b/react_week2_fixed/5.md
@@ -0,0 +1,25 @@
+## Else if
+
+The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
+
+``` javascript
+
+ let buttonsize = 4;
+ if (buttonsize < 5)
+ {
+ document.write("Button is too small!");
+ }
+ else if (buttonsize===5)
+ {
+ alert("Perfect size!");
+ }
+ else
+ {
+ document.write("Button is too big!");
+ }
+```
+
+Recall that `===` is what we use to equate. What does this code block do?
+
+Write an if/else statement which checks to see if button font is bigger than 32 pp, and if it is, it will print("this is large"). However, otherwise, the code will print("this is small!")
+
diff --git a/react_week2_fixed/6.md b/react_week2_fixed/6.md
new file mode 100644
index 00000000..192c3963
--- /dev/null
+++ b/react_week2_fixed/6.md
@@ -0,0 +1,24 @@
+## Switch
+
+The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
+
+``` javascript
+ const fruit = 'Papayas';
+switch (fruit) {
+ case 'Oranges':
+ document.write('Oranges are $0.59 a pound.');
+ break;
+ case 'Papayas':
+ document.write('Papayas are $2.79 a pound.');
+ break;
+ default:
+ document.write('Sorry, we are out of ' + fruit + '.');
+}
+```
+
+We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
+
+Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
+
+When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
+
diff --git a/react_week2_fixed/7.md b/react_week2_fixed/7.md
new file mode 100644
index 00000000..4aceec5d
--- /dev/null
+++ b/react_week2_fixed/7.md
@@ -0,0 +1,37 @@
+## For Loops
+
+For loops iterate a certain amount of times, often dictated by the amount of items in an array. Let's look at an example and dissect it from there:
+
+``` javascript
+ let buttoncolor = ["Red", "Blue", "Green", "Yellow", "Maroon", "Black"];
+ let i;
+ for (i = 0; i < buttoncolor.length; i++) {
+ document.write(buttoncolor[i] + ", ")
+ }
+```
+
+This script will iterate 5 times and will print this: `Red, Blue, Green, Yellow, Maroon, Black`
+
+Recall that arrays start indexing their first item as buttoncolor[0]. This means that buttoncolor[5] becomes `Black`. Hence, we can print all of the array.
+
+The general format of the for loop is as follows:
+
+`for (x,y,z){`
+
+`code to be executed`
+
+`}`
+
+where x is executed once before the code block, y defines the condition to the execution of the code block, and z executes after the code block has been executed.
+
+What will this print?
+
+```javascript
+let buttonsizes=["10","20","30","40"];
+let x;
+for (x=2; x<3; x++){
+ document.write(buttonsizes[i]+",")
+}
+```
+
+Remember that the first value in JavaScript is actually 0!
\ No newline at end of file
diff --git a/react_week2_fixed/8.md b/react_week2_fixed/8.md
new file mode 100644
index 00000000..be9624f4
--- /dev/null
+++ b/react_week2_fixed/8.md
@@ -0,0 +1,36 @@
+## While Loops
+
+While loops iterate through the loop for as long as the condition is true. Let's look at an example:
+
+``` javascript
+ let buttontext = "";
+ let i = 0;
+ while (i < 10) {
+ buttontext += " The number is " + i;
+ i++;
+}
+document.write(buttontext)
+```
+
+This loop iterates 0-9 times, so our result will look like this:
+
+`The number is 0
+The number is 1` and so forth. The while loop iterated until i became 10, and then stopped iterating. The `i++` function adds 1 to i and increments it. `i--` would decrement the code.
+
+The general format of the while loop is as follows:
+
+`while (condition) {`
+
+`code to be executed`
+
+`}`
+
+What would this print?
+
+```javascript
+let button="";
+let x=0;
+while(x<10){
+ document.write(x)
+}
+```
\ No newline at end of file
diff --git a/react_week2_fixed/9.md b/react_week2_fixed/9.md
new file mode 100644
index 00000000..fc180c9d
--- /dev/null
+++ b/react_week2_fixed/9.md
@@ -0,0 +1,22 @@
+## Break
+
+Break statements forces the loop to stop iterating and forces the code onto the next line of text. Here's what a break statement would look like:
+
+``` js
+ let buttontext = "";
+ let i;
+ for (i = 0; i < 10; i++) {
+ if (i === 3) { break; }
+ buttontext += "The number is " + i + " ";
+}
+document.write(buttontext)
+```
+
+
+Instead of printing all nine numbers, the code will print this:
+
+`The number is 0
+The number is 1
+The number is 2`
+
+Because it will `break` when `i===3` and will skip past any of the remaining code.
\ No newline at end of file
From fd7a90b76e07b32501b006598bf6b7e7a469e7cb Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:02:01 -0800
Subject: [PATCH 073/123] Delete 9.md
---
9.md | 22 ----------------------
1 file changed, 22 deletions(-)
delete mode 100644 9.md
diff --git a/9.md b/9.md
deleted file mode 100644
index fc180c9d..00000000
--- a/9.md
+++ /dev/null
@@ -1,22 +0,0 @@
-## Break
-
-Break statements forces the loop to stop iterating and forces the code onto the next line of text. Here's what a break statement would look like:
-
-``` js
- let buttontext = "";
- let i;
- for (i = 0; i < 10; i++) {
- if (i === 3) { break; }
- buttontext += "The number is " + i + " ";
-}
-document.write(buttontext)
-```
-
-
-Instead of printing all nine numbers, the code will print this:
-
-`The number is 0
-The number is 1
-The number is 2`
-
-Because it will `break` when `i===3` and will skip past any of the remaining code.
\ No newline at end of file
From 2814daf8911eb85aa4fb157d9547892c76352049 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:02:11 -0800
Subject: [PATCH 074/123] Delete 1.md
---
1.md | 16 ----------------
1 file changed, 16 deletions(-)
delete mode 100644 1.md
diff --git a/1.md b/1.md
deleted file mode 100644
index ee4c11e7..00000000
--- a/1.md
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-# What is JavaScript?
-
-JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
-
-JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
-
-
-
-The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
-
-For instance, the tag goes at the top, and th
-
-
-
From 0bba1f60737280d2911a15c74602bcc5895c777c Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:09:36 -0800
Subject: [PATCH 075/123] Delete 10.md
---
10.md | 30 ------------------------------
1 file changed, 30 deletions(-)
delete mode 100644 10.md
diff --git a/10.md b/10.md
deleted file mode 100644
index a0cbfa00..00000000
--- a/10.md
+++ /dev/null
@@ -1,30 +0,0 @@
-## Continue
-
-Continue values are like the "opposite" of breaks. Instead of breaking out of the loop, they reiterate the function:
-
-``` javascript
- let buttontext = "";
- let i;
- for (i = 0; i < 10; i++) {
- if (i === 3) { continue; }
- buttontext += "The number is " + i + " ";
-}
-document.write(buttontext)
-```
-
-
-The result will skip over 3 until it reaches the end of the loop and then it will contunue to the next code block.
-
-What would this print?
-
-```javascript
- let buttonsize = "";
- let x;
- for (x = 2; x < 10; i++) {
- if (x === 2) { continue; }
- buttonsize += x + " ";
-}
-document.write(buttonsize)
-```
-
-This would end up skipping the first value
\ No newline at end of file
From d149a884b64bdcb17821c5f6d0c3f258b83780c3 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:09:52 -0800
Subject: [PATCH 076/123] Delete 11.md
---
11.md | 37 -------------------------------------
1 file changed, 37 deletions(-)
delete mode 100644 11.md
diff --git a/11.md b/11.md
deleted file mode 100644
index eaf6544e..00000000
--- a/11.md
+++ /dev/null
@@ -1,37 +0,0 @@
-## Functions
-
-A function in JavaScript is a block of code which is designed to do something. When the function is invoked, the code performs a certain task. In the example below, we want to multiply two numbers.
-
-``` javascript
- let x = buttonFunction(4, 3);
-function buttonFunction(a, b) {
- return a * b;
-}
-```
-
-
-The result will be 12.
-
-When the code hits the `return`, the code will stop executing.
-
-The general format for a function is as follows:
-
-`function name(parameter1, parameter2, parameter3...){`
-
-`code to be executed`
-
-}
-
-Functions are usefull because they can be defined according to our needs and can be used however we see fit.
-
-Make your own function which adds two numbers!
-
-Answer:
-
-```javascript
-let x = buttonAdd(30,50)
-function buttonAdd(a,b){
- return a+b;
-}
-```
-
From f4787368acc3a6804769654301457a6064ebfe7d Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:10:11 -0800
Subject: [PATCH 077/123] Delete 1.md
---
react_week2_fixed/1.md | 16 ----------------
1 file changed, 16 deletions(-)
delete mode 100644 react_week2_fixed/1.md
diff --git a/react_week2_fixed/1.md b/react_week2_fixed/1.md
deleted file mode 100644
index ee4c11e7..00000000
--- a/react_week2_fixed/1.md
+++ /dev/null
@@ -1,16 +0,0 @@
-
-
-# What is JavaScript?
-
-JavaScript is a dynamic programming which can enhance the user's expirience and allows the user to interact with the webpage.
-
-JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
-
-
-
-The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
-
-For instance, the tag goes at the top, and th
-
-
-
From c5dd3aff112276d25a3d3669494de4aaea530aec Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:10:18 -0800
Subject: [PATCH 078/123] Delete 10.md
---
react_week2_fixed/10.md | 30 ------------------------------
1 file changed, 30 deletions(-)
delete mode 100644 react_week2_fixed/10.md
diff --git a/react_week2_fixed/10.md b/react_week2_fixed/10.md
deleted file mode 100644
index a0cbfa00..00000000
--- a/react_week2_fixed/10.md
+++ /dev/null
@@ -1,30 +0,0 @@
-## Continue
-
-Continue values are like the "opposite" of breaks. Instead of breaking out of the loop, they reiterate the function:
-
-``` javascript
- let buttontext = "";
- let i;
- for (i = 0; i < 10; i++) {
- if (i === 3) { continue; }
- buttontext += "The number is " + i + " ";
-}
-document.write(buttontext)
-```
-
-
-The result will skip over 3 until it reaches the end of the loop and then it will contunue to the next code block.
-
-What would this print?
-
-```javascript
- let buttonsize = "";
- let x;
- for (x = 2; x < 10; i++) {
- if (x === 2) { continue; }
- buttonsize += x + " ";
-}
-document.write(buttonsize)
-```
-
-This would end up skipping the first value
\ No newline at end of file
From 9f18722c2defa6834c0a9ace04c0b278e18de1b6 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:10:26 -0800
Subject: [PATCH 079/123] Delete 11.md
---
react_week2_fixed/11.md | 37 -------------------------------------
1 file changed, 37 deletions(-)
delete mode 100644 react_week2_fixed/11.md
diff --git a/react_week2_fixed/11.md b/react_week2_fixed/11.md
deleted file mode 100644
index eaf6544e..00000000
--- a/react_week2_fixed/11.md
+++ /dev/null
@@ -1,37 +0,0 @@
-## Functions
-
-A function in JavaScript is a block of code which is designed to do something. When the function is invoked, the code performs a certain task. In the example below, we want to multiply two numbers.
-
-``` javascript
- let x = buttonFunction(4, 3);
-function buttonFunction(a, b) {
- return a * b;
-}
-```
-
-
-The result will be 12.
-
-When the code hits the `return`, the code will stop executing.
-
-The general format for a function is as follows:
-
-`function name(parameter1, parameter2, parameter3...){`
-
-`code to be executed`
-
-}
-
-Functions are usefull because they can be defined according to our needs and can be used however we see fit.
-
-Make your own function which adds two numbers!
-
-Answer:
-
-```javascript
-let x = buttonAdd(30,50)
-function buttonAdd(a,b){
- return a+b;
-}
-```
-
From ca8ad12865cf5796fcb829e9d9b3a9f4e34a37cb Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:10:33 -0800
Subject: [PATCH 080/123] Delete 12.md
---
react_week2_fixed/12.md | 41 -----------------------------------------
1 file changed, 41 deletions(-)
delete mode 100644 react_week2_fixed/12.md
diff --git a/react_week2_fixed/12.md b/react_week2_fixed/12.md
deleted file mode 100644
index 2caf7bf8..00000000
--- a/react_week2_fixed/12.md
+++ /dev/null
@@ -1,41 +0,0 @@
-## Arrow Functions
-
-ES6 introduced "Arrow Functions", which make using functions easier.
-
-Here's the "Hello World!" as how we did it earlier
-
-``` JavaScript
-document.write("Hello World!");
-```
-
-And here's "Hello World!" using a function
-
-``` javascript
- hello = function(){
- return "Hello World!"
- }
-```
-
-And here's "Hello World" using an Arrow Function
-
-``` JavaScript
- hello = () => "Hello World!"
-```
-
-
-Notice that the function got shorter. If the function has one value and has a return function, we can omit the `function` and `return` statement all together.
-
-This provides compactness and clarity to the code.
-
-Let's write this function as an arrow function:
-
-```javascript
-let addition = function (x,y){
- return x+y
-}
-```
-
-
-
-
-
From 3b404a5c4355cdce331560ca693ce82ae5b06eb8 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:10:40 -0800
Subject: [PATCH 081/123] Delete 13.md
---
react_week2_fixed/13.md | 40 ----------------------------------------
1 file changed, 40 deletions(-)
delete mode 100644 react_week2_fixed/13.md
diff --git a/react_week2_fixed/13.md b/react_week2_fixed/13.md
deleted file mode 100644
index 25564b00..00000000
--- a/react_week2_fixed/13.md
+++ /dev/null
@@ -1,40 +0,0 @@
-## Objects Basics
-
-Almost all objects in JavaScript are parts of the keyword `Object`. Objects are usually initialized with the `Object()` method.
-
- Objects "inherit" their properties from other objects, often called "object prototypes." This inheritance based on linking prototypes together is known as the "prototype chain." Prototypes are defined by `Object.prototype`
-
-Objects can be thought of as a variable that holds many data types in **name:value** pairs. We can access the data stored in objects by calling the name.
-
-```JavaScript
-let button = {
- name: "color changer",
- text: "this changes colors",
- buttonwords: () => this.name + " " + this.text
- }
-};
-```
-
-We can call the properties in this object in two ways:
-
-```JavaScript
-object.name
-// or
-object['name']
-```
-
-We could call the first name of the `person` variable like this:
-
-```JavaScript
-let call = button.name;
-// or
-let call = button['name'];
-```
-
-We've been using objects and their methods this whole time!
-
-```JavaScript
-document.write("Hello World!")
-```
-
-The `write()` method is modifying the `document` object.
\ No newline at end of file
From 808349de07ce1a3647bd9d774d2b0685589b8bac Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:10:49 -0800
Subject: [PATCH 082/123] Delete 14.md
---
react_week2_fixed/14.md | 37 -------------------------------------
1 file changed, 37 deletions(-)
delete mode 100644 react_week2_fixed/14.md
diff --git a/react_week2_fixed/14.md b/react_week2_fixed/14.md
deleted file mode 100644
index a93d1ab2..00000000
--- a/react_week2_fixed/14.md
+++ /dev/null
@@ -1,37 +0,0 @@
-## Objects Advanced
-
-Now that we know how Objects look like in JavaScript, let's constuct our own objects.
-
-``` JavaScript
-let button = {
- color: "blue",
- size: 50,
- content: "click me!"
-}
-```
-
-This method only allows you to create one object. If we want to create several objects, we will want to create an object type.
-
-```javascript
-function button(color, size, content){
- this.color=color;
- this.size=size;
- this.content=content;;
-}
-// the keyword "this" is a reserved keyword which refers to the current object
-// "this" is not a variable and cannot be changed
-```
-
-This is an "object constructor", which takes parameters and allows the assignment to object properties. Now, if we want to create new object, we can use the `new` keyword
-
-```javascript
-function button(color, size, content){
- this.color=color;
- this.size=size;
- this.content=content;;
-}
-let orderbutton= new button("blue",50,"clickme!")
-```
-
-Let's make an object `button` which has three elements: font size, font, and color.
-
From 9758a7f5382a93081c9033d63545b90ecbc8b509 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:10:56 -0800
Subject: [PATCH 083/123] Delete 15.md
---
react_week2_fixed/15.md | 27 ---------------------------
1 file changed, 27 deletions(-)
delete mode 100644 react_week2_fixed/15.md
diff --git a/react_week2_fixed/15.md b/react_week2_fixed/15.md
deleted file mode 100644
index dbdbae5b..00000000
--- a/react_week2_fixed/15.md
+++ /dev/null
@@ -1,27 +0,0 @@
-## Events
-
-Events allow the user to interact with the webpage and is what sets JavaScript apart from other languages.
-
-``` JavaScript
- document.querySelector('html').onclick = function() {
- alert('Now, this is interactivity!');
-```
-
-
-The `querySelector` selects the `` element, setting onclick to a nameless function, which are also called anonymous functions, and generating the alert.
-
-Let's generate another event, one that tells us the date and time:
-
-``` javascript
-function displayDate() {
- document.getElementById("time").innerHTML = Date();
-}
-```
-
-When run, this little bit of code will allow us to generate the time that it currently is using JavaScript. Of course, we're going to need someway to generate the date and time, and for that we would use the button function in HTML. That's going to be your challenge activity.
-
-Here's a common list of events:
-
-
-
-Construct an event which, on mouseover, will perform an `alert()`
\ No newline at end of file
From c0930fb89cc9386f8af6b20c54780efeb1796c1a Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:11:04 -0800
Subject: [PATCH 084/123] Delete 16.md
---
react_week2_fixed/16.md | 32 --------------------------------
1 file changed, 32 deletions(-)
delete mode 100644 react_week2_fixed/16.md
diff --git a/react_week2_fixed/16.md b/react_week2_fixed/16.md
deleted file mode 100644
index fab24a9c..00000000
--- a/react_week2_fixed/16.md
+++ /dev/null
@@ -1,32 +0,0 @@
-## Arrays
-
-JavaScript allows arrays, a special type of object.
-
-This is an example of an array:
-
-`let fruit = ["Mango", "Apple", "Banana"]`
-
-It functions as a list. The easiest way to create an array is
-
-`let array_name = [item1, item2, item3...]`
-
-JS has a keyword named `new` which creates and assigns values to it:
-
-`let fruit = new Array ("Mango", "Apple", Banana)`
-
-To access an item of an array, we reference the **index number**
-
-`let name = fruit[0]` will return the first item in the array, which is "Mango". In JS, indexing starts at "0", meaning that the first item is referenced as 0.
-
-What happens if we want to change an item in an array? We do this:
-
-`fruit[0]=Watermelon` This assigns the first item to the value "Watermelon"
-
-We can use different methods to perform a variety of functions. For instance, the following block will give us the length of the fruit array.
-
-`let x = fruit.length();`
-
-There are several other methods:
-
-
-
From c073a452071cb9278e1ef96e29f128237ab5edfd Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:11:18 -0800
Subject: [PATCH 085/123] Delete 17.md
---
react_week2_fixed/17.md | 24 ------------------------
1 file changed, 24 deletions(-)
delete mode 100644 react_week2_fixed/17.md
diff --git a/react_week2_fixed/17.md b/react_week2_fixed/17.md
deleted file mode 100644
index 236588f7..00000000
--- a/react_week2_fixed/17.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## .map()
-
-Using the `map()` keyword simplifies the indexing of arrays and returns the value you want.
-Let's assume that you recieve an array with the name and age of several people. However, you only want the ages of the people.
-
-```javascript
-let button = [
- { color: "blue", text: 'click me!' },
- { color: "red", text: 'test button' },
- { color: "black", text: 'generate!' },
- { color: "green", text: 'see results!' }
-];
-// we want the color of the button
-```
-
-You can use `.map()` to return the color of this object.
-
-```javascript
-const buttoncolor = button.map(button => button.color);
-```
-
-`.map` looks through each individual element of an array and returns only what we are looking for.
-
-Write a `.map()` function to return the text in this object.
\ No newline at end of file
From bd662067a8b2a3e507237b5ef1a4e54c5245d32c Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:11:45 -0800
Subject: [PATCH 086/123] Delete 18.md
---
react_week2_fixed/18.md | 36 ------------------------------------
1 file changed, 36 deletions(-)
delete mode 100644 react_week2_fixed/18.md
diff --git a/react_week2_fixed/18.md b/react_week2_fixed/18.md
deleted file mode 100644
index d8415422..00000000
--- a/react_week2_fixed/18.md
+++ /dev/null
@@ -1,36 +0,0 @@
-## .reduce()
-
-Just like `.map()`, `.reduce()` looks through all the elements in an array but only returns one value that you want. Let's look at an example:
-
-```javascript
-let button = [
- {
- id: 1,
- text: "1",
- value: 1,
- },
- {
- id: 2,
- text: "+",
- value: 0 ,
- },
- {
- id: 3,
- text: "2",
- value: 2,
- }
-];
-// we want the largest value in this array
-```
-
-Using `.reduce()`, we'll be able to find the oldest person in the array:
-
-```javascript
-let largestvalue = button.reduce(function (largevalue, button) {
- return (largevalue.value || 0) > button.value ? largevalue : button;
-}, {});
-```
-
-Naming the accumulator `largevalue` is a way to check each element in an array. If one value is larger than the other, then that value becomes the new `largevalue`.
-
-Use `.reduce()` to find the youngest person in the array.
\ No newline at end of file
From cfcc36beeb9739cb6b4803365cb8f84ad945c056 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:11:53 -0800
Subject: [PATCH 087/123] Delete 19.md
---
react_week2_fixed/19.md | 38 --------------------------------------
1 file changed, 38 deletions(-)
delete mode 100644 react_week2_fixed/19.md
diff --git a/react_week2_fixed/19.md b/react_week2_fixed/19.md
deleted file mode 100644
index 1175ec14..00000000
--- a/react_week2_fixed/19.md
+++ /dev/null
@@ -1,38 +0,0 @@
-## .filter()
-
-`.filter()`, like both `.map()` and `.reduce()` is a way to generate values that you'd want.
-
-```javascript
-let button = [
- {
- id: 1,
- text: "Hi!",
- language: "english" ,
- },
- {
- id: 2,
- text: "Hola!",
- language: "spanish" ,
- },
- {
- id: 3,
- text: "Thanks!",
- language: "english",
- },
- {
- id: 4,
- text: "Gracias!",
- language: "spanish",
- }
-];
-// we want two arrays, one for the button language that is spanish and the other that is english
-```
-
-We'd create the two arrays like this:
-
-```javascript
-const spanish = button.filter(button => button.language === "spanish");
-const english = button.filter(button => button.language === "english");
-```
-
-This checks if the value in `language` returns true for each function, which would place that value in the array.
\ No newline at end of file
From 30f8f66fc49decf8ae1d2b965f7e0e121de0ee67 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:12:01 -0800
Subject: [PATCH 088/123] Delete 2.md
---
react_week2_fixed/2.md | 43 ------------------------------------------
1 file changed, 43 deletions(-)
delete mode 100644 react_week2_fixed/2.md
diff --git a/react_week2_fixed/2.md b/react_week2_fixed/2.md
deleted file mode 100644
index a75a099b..00000000
--- a/react_week2_fixed/2.md
+++ /dev/null
@@ -1,43 +0,0 @@
-## Introduction to JavaScript
-
-JS is written by inserting a "script" tag into the HTML webpage as shown here:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-The script tag can be placed in either the header tag or the body tag.
-
-Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
-
-
-
-
-
-
-
-**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
-
-
-
-
-
-
-
-
-
From 80acf8367520b0debd130aa0f0d48a2f761e965e Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:12:08 -0800
Subject: [PATCH 089/123] Delete 20.md
---
react_week2_fixed/20.md | 29 -----------------------------
1 file changed, 29 deletions(-)
delete mode 100644 react_week2_fixed/20.md
diff --git a/react_week2_fixed/20.md b/react_week2_fixed/20.md
deleted file mode 100644
index 21a134d6..00000000
--- a/react_week2_fixed/20.md
+++ /dev/null
@@ -1,29 +0,0 @@
-## Button
-
-With our new knowldge of JavaScript and HTML, let's make a button which on click, which would change colors!
-
-This is one way we can do it:
-
-```html
-
-
-
-```
-
-This is how the button would look like before clicking it:
-
-
-
-And this is the button after it is clicked:
-
-
-
-Let's make another button, which upon mousover, will change colors.
\ No newline at end of file
From 1723cbd19aaf3fe2e5228e594b4f17c01f030752 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:12:15 -0800
Subject: [PATCH 090/123] Delete 3.md
---
react_week2_fixed/3.md | 18 ------------------
1 file changed, 18 deletions(-)
delete mode 100644 react_week2_fixed/3.md
diff --git a/react_week2_fixed/3.md b/react_week2_fixed/3.md
deleted file mode 100644
index 75d70430..00000000
--- a/react_week2_fixed/3.md
+++ /dev/null
@@ -1,18 +0,0 @@
-## External JS
-
-Although the
-
-External JavaScripts can either be put into the head or body part of the DOM. For the rest of the course, we'll be making new files and using external JavaScript in order to initialize the code.
-
-External scripts should not contain the script tag.
\ No newline at end of file
From 795a10552bd91dff929aace795ef5f0dfae11bc0 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:12:21 -0800
Subject: [PATCH 091/123] Delete 4.md
---
react_week2_fixed/4.md | 24 ------------------------
1 file changed, 24 deletions(-)
delete mode 100644 react_week2_fixed/4.md
diff --git a/react_week2_fixed/4.md b/react_week2_fixed/4.md
deleted file mode 100644
index fedda1e8..00000000
--- a/react_week2_fixed/4.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## The If/Else Statements
-
-Let's examine the first one, the `if` and `else` conditional.
-
-```javascript
-
- let buttonsize = 4;
- if (buttonsize < 5)
- {
- document.write("Button is too small!");
- }
- else
- {
- document.write("Button is too big!");
- }
-```
-
-The if/else statemenent checks the condition and then does whatever the specific condition we make it do.
-
-What does the above code block do?
-
-What happens if we have more than one condition?
-
-Enter the "else if" condition
\ No newline at end of file
From 7450b55aea207427d8eea3b0849ae877a944b232 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:12:28 -0800
Subject: [PATCH 092/123] Delete 5.md
---
react_week2_fixed/5.md | 25 -------------------------
1 file changed, 25 deletions(-)
delete mode 100644 react_week2_fixed/5.md
diff --git a/react_week2_fixed/5.md b/react_week2_fixed/5.md
deleted file mode 100644
index c998af0e..00000000
--- a/react_week2_fixed/5.md
+++ /dev/null
@@ -1,25 +0,0 @@
-## Else if
-
-The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
-
-``` javascript
-
- let buttonsize = 4;
- if (buttonsize < 5)
- {
- document.write("Button is too small!");
- }
- else if (buttonsize===5)
- {
- alert("Perfect size!");
- }
- else
- {
- document.write("Button is too big!");
- }
-```
-
-Recall that `===` is what we use to equate. What does this code block do?
-
-Write an if/else statement which checks to see if button font is bigger than 32 pp, and if it is, it will print("this is large"). However, otherwise, the code will print("this is small!")
-
From bce2359935e18cd9ca67ed7259d479f85e31308c Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:12:36 -0800
Subject: [PATCH 093/123] Delete 6.md
---
react_week2_fixed/6.md | 24 ------------------------
1 file changed, 24 deletions(-)
delete mode 100644 react_week2_fixed/6.md
diff --git a/react_week2_fixed/6.md b/react_week2_fixed/6.md
deleted file mode 100644
index 192c3963..00000000
--- a/react_week2_fixed/6.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## Switch
-
-The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
-
-``` javascript
- const fruit = 'Papayas';
-switch (fruit) {
- case 'Oranges':
- document.write('Oranges are $0.59 a pound.');
- break;
- case 'Papayas':
- document.write('Papayas are $2.79 a pound.');
- break;
- default:
- document.write('Sorry, we are out of ' + fruit + '.');
-}
-```
-
-We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
-
-Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
-
-When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
-
From 60745600fb082109e107447e7b9a4234f4717d73 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:12:42 -0800
Subject: [PATCH 094/123] Delete 7.md
---
react_week2_fixed/7.md | 37 -------------------------------------
1 file changed, 37 deletions(-)
delete mode 100644 react_week2_fixed/7.md
diff --git a/react_week2_fixed/7.md b/react_week2_fixed/7.md
deleted file mode 100644
index 4aceec5d..00000000
--- a/react_week2_fixed/7.md
+++ /dev/null
@@ -1,37 +0,0 @@
-## For Loops
-
-For loops iterate a certain amount of times, often dictated by the amount of items in an array. Let's look at an example and dissect it from there:
-
-``` javascript
- let buttoncolor = ["Red", "Blue", "Green", "Yellow", "Maroon", "Black"];
- let i;
- for (i = 0; i < buttoncolor.length; i++) {
- document.write(buttoncolor[i] + ", ")
- }
-```
-
-This script will iterate 5 times and will print this: `Red, Blue, Green, Yellow, Maroon, Black`
-
-Recall that arrays start indexing their first item as buttoncolor[0]. This means that buttoncolor[5] becomes `Black`. Hence, we can print all of the array.
-
-The general format of the for loop is as follows:
-
-`for (x,y,z){`
-
-`code to be executed`
-
-`}`
-
-where x is executed once before the code block, y defines the condition to the execution of the code block, and z executes after the code block has been executed.
-
-What will this print?
-
-```javascript
-let buttonsizes=["10","20","30","40"];
-let x;
-for (x=2; x<3; x++){
- document.write(buttonsizes[i]+",")
-}
-```
-
-Remember that the first value in JavaScript is actually 0!
\ No newline at end of file
From 4582fbca7223a4eedcfb12970e174d94d818b98b Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:12:48 -0800
Subject: [PATCH 095/123] Delete 8.md
---
react_week2_fixed/8.md | 36 ------------------------------------
1 file changed, 36 deletions(-)
delete mode 100644 react_week2_fixed/8.md
diff --git a/react_week2_fixed/8.md b/react_week2_fixed/8.md
deleted file mode 100644
index be9624f4..00000000
--- a/react_week2_fixed/8.md
+++ /dev/null
@@ -1,36 +0,0 @@
-## While Loops
-
-While loops iterate through the loop for as long as the condition is true. Let's look at an example:
-
-``` javascript
- let buttontext = "";
- let i = 0;
- while (i < 10) {
- buttontext += " The number is " + i;
- i++;
-}
-document.write(buttontext)
-```
-
-This loop iterates 0-9 times, so our result will look like this:
-
-`The number is 0
-The number is 1` and so forth. The while loop iterated until i became 10, and then stopped iterating. The `i++` function adds 1 to i and increments it. `i--` would decrement the code.
-
-The general format of the while loop is as follows:
-
-`while (condition) {`
-
-`code to be executed`
-
-`}`
-
-What would this print?
-
-```javascript
-let button="";
-let x=0;
-while(x<10){
- document.write(x)
-}
-```
\ No newline at end of file
From 755f82527c07990902b5a7c44e7c2fa778368147 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:12:54 -0800
Subject: [PATCH 096/123] Delete 9.md
---
react_week2_fixed/9.md | 22 ----------------------
1 file changed, 22 deletions(-)
delete mode 100644 react_week2_fixed/9.md
diff --git a/react_week2_fixed/9.md b/react_week2_fixed/9.md
deleted file mode 100644
index fc180c9d..00000000
--- a/react_week2_fixed/9.md
+++ /dev/null
@@ -1,22 +0,0 @@
-## Break
-
-Break statements forces the loop to stop iterating and forces the code onto the next line of text. Here's what a break statement would look like:
-
-``` js
- let buttontext = "";
- let i;
- for (i = 0; i < 10; i++) {
- if (i === 3) { break; }
- buttontext += "The number is " + i + " ";
-}
-document.write(buttontext)
-```
-
-
-Instead of printing all nine numbers, the code will print this:
-
-`The number is 0
-The number is 1
-The number is 2`
-
-Because it will `break` when `i===3` and will skip past any of the remaining code.
\ No newline at end of file
From a96fefe5a4deba7629a64e2cd62e13a3349236e6 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:13:03 -0800
Subject: [PATCH 097/123] Delete 12.md
---
12.md | 41 -----------------------------------------
1 file changed, 41 deletions(-)
delete mode 100644 12.md
diff --git a/12.md b/12.md
deleted file mode 100644
index 2caf7bf8..00000000
--- a/12.md
+++ /dev/null
@@ -1,41 +0,0 @@
-## Arrow Functions
-
-ES6 introduced "Arrow Functions", which make using functions easier.
-
-Here's the "Hello World!" as how we did it earlier
-
-``` JavaScript
-document.write("Hello World!");
-```
-
-And here's "Hello World!" using a function
-
-``` javascript
- hello = function(){
- return "Hello World!"
- }
-```
-
-And here's "Hello World" using an Arrow Function
-
-``` JavaScript
- hello = () => "Hello World!"
-```
-
-
-Notice that the function got shorter. If the function has one value and has a return function, we can omit the `function` and `return` statement all together.
-
-This provides compactness and clarity to the code.
-
-Let's write this function as an arrow function:
-
-```javascript
-let addition = function (x,y){
- return x+y
-}
-```
-
-
-
-
-
From 494245ec466b8cb610a13093384eb321bf75beb9 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:13:10 -0800
Subject: [PATCH 098/123] Delete 13.md
---
13.md | 40 ----------------------------------------
1 file changed, 40 deletions(-)
delete mode 100644 13.md
diff --git a/13.md b/13.md
deleted file mode 100644
index 25564b00..00000000
--- a/13.md
+++ /dev/null
@@ -1,40 +0,0 @@
-## Objects Basics
-
-Almost all objects in JavaScript are parts of the keyword `Object`. Objects are usually initialized with the `Object()` method.
-
- Objects "inherit" their properties from other objects, often called "object prototypes." This inheritance based on linking prototypes together is known as the "prototype chain." Prototypes are defined by `Object.prototype`
-
-Objects can be thought of as a variable that holds many data types in **name:value** pairs. We can access the data stored in objects by calling the name.
-
-```JavaScript
-let button = {
- name: "color changer",
- text: "this changes colors",
- buttonwords: () => this.name + " " + this.text
- }
-};
-```
-
-We can call the properties in this object in two ways:
-
-```JavaScript
-object.name
-// or
-object['name']
-```
-
-We could call the first name of the `person` variable like this:
-
-```JavaScript
-let call = button.name;
-// or
-let call = button['name'];
-```
-
-We've been using objects and their methods this whole time!
-
-```JavaScript
-document.write("Hello World!")
-```
-
-The `write()` method is modifying the `document` object.
\ No newline at end of file
From 02dba7148d83eed9ec4e050bb30fa026581bd2d8 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:13:18 -0800
Subject: [PATCH 099/123] Delete 14.md
---
14.md | 37 -------------------------------------
1 file changed, 37 deletions(-)
delete mode 100644 14.md
diff --git a/14.md b/14.md
deleted file mode 100644
index a93d1ab2..00000000
--- a/14.md
+++ /dev/null
@@ -1,37 +0,0 @@
-## Objects Advanced
-
-Now that we know how Objects look like in JavaScript, let's constuct our own objects.
-
-``` JavaScript
-let button = {
- color: "blue",
- size: 50,
- content: "click me!"
-}
-```
-
-This method only allows you to create one object. If we want to create several objects, we will want to create an object type.
-
-```javascript
-function button(color, size, content){
- this.color=color;
- this.size=size;
- this.content=content;;
-}
-// the keyword "this" is a reserved keyword which refers to the current object
-// "this" is not a variable and cannot be changed
-```
-
-This is an "object constructor", which takes parameters and allows the assignment to object properties. Now, if we want to create new object, we can use the `new` keyword
-
-```javascript
-function button(color, size, content){
- this.color=color;
- this.size=size;
- this.content=content;;
-}
-let orderbutton= new button("blue",50,"clickme!")
-```
-
-Let's make an object `button` which has three elements: font size, font, and color.
-
From 61f6a8d5a004874ec27e97bf84f397bec71a0d67 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:13:35 -0800
Subject: [PATCH 100/123] Delete 15.md
---
15.md | 27 ---------------------------
1 file changed, 27 deletions(-)
delete mode 100644 15.md
diff --git a/15.md b/15.md
deleted file mode 100644
index dbdbae5b..00000000
--- a/15.md
+++ /dev/null
@@ -1,27 +0,0 @@
-## Events
-
-Events allow the user to interact with the webpage and is what sets JavaScript apart from other languages.
-
-``` JavaScript
- document.querySelector('html').onclick = function() {
- alert('Now, this is interactivity!');
-```
-
-
-The `querySelector` selects the `` element, setting onclick to a nameless function, which are also called anonymous functions, and generating the alert.
-
-Let's generate another event, one that tells us the date and time:
-
-``` javascript
-function displayDate() {
- document.getElementById("time").innerHTML = Date();
-}
-```
-
-When run, this little bit of code will allow us to generate the time that it currently is using JavaScript. Of course, we're going to need someway to generate the date and time, and for that we would use the button function in HTML. That's going to be your challenge activity.
-
-Here's a common list of events:
-
-
-
-Construct an event which, on mouseover, will perform an `alert()`
\ No newline at end of file
From f0263683272df524471fc29fc0719db496ef5c4f Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:13:43 -0800
Subject: [PATCH 101/123] Delete 16.md
---
16.md | 32 --------------------------------
1 file changed, 32 deletions(-)
delete mode 100644 16.md
diff --git a/16.md b/16.md
deleted file mode 100644
index fab24a9c..00000000
--- a/16.md
+++ /dev/null
@@ -1,32 +0,0 @@
-## Arrays
-
-JavaScript allows arrays, a special type of object.
-
-This is an example of an array:
-
-`let fruit = ["Mango", "Apple", "Banana"]`
-
-It functions as a list. The easiest way to create an array is
-
-`let array_name = [item1, item2, item3...]`
-
-JS has a keyword named `new` which creates and assigns values to it:
-
-`let fruit = new Array ("Mango", "Apple", Banana)`
-
-To access an item of an array, we reference the **index number**
-
-`let name = fruit[0]` will return the first item in the array, which is "Mango". In JS, indexing starts at "0", meaning that the first item is referenced as 0.
-
-What happens if we want to change an item in an array? We do this:
-
-`fruit[0]=Watermelon` This assigns the first item to the value "Watermelon"
-
-We can use different methods to perform a variety of functions. For instance, the following block will give us the length of the fruit array.
-
-`let x = fruit.length();`
-
-There are several other methods:
-
-
-
From 16a5a80441c8176faa6e2a2ddf240df418dd81ab Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:13:52 -0800
Subject: [PATCH 102/123] Delete 17.md
---
17.md | 24 ------------------------
1 file changed, 24 deletions(-)
delete mode 100644 17.md
diff --git a/17.md b/17.md
deleted file mode 100644
index 236588f7..00000000
--- a/17.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## .map()
-
-Using the `map()` keyword simplifies the indexing of arrays and returns the value you want.
-Let's assume that you recieve an array with the name and age of several people. However, you only want the ages of the people.
-
-```javascript
-let button = [
- { color: "blue", text: 'click me!' },
- { color: "red", text: 'test button' },
- { color: "black", text: 'generate!' },
- { color: "green", text: 'see results!' }
-];
-// we want the color of the button
-```
-
-You can use `.map()` to return the color of this object.
-
-```javascript
-const buttoncolor = button.map(button => button.color);
-```
-
-`.map` looks through each individual element of an array and returns only what we are looking for.
-
-Write a `.map()` function to return the text in this object.
\ No newline at end of file
From e4dfd0bcc327827c9025129808cc6f96d07951e6 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:20:48 -0800
Subject: [PATCH 103/123] Add files via upload
---
react_week2_fixed/1.md | 14 +++++++++
react_week2_fixed/10.md | 38 +++++++++++++++++++++++
react_week2_fixed/11.md | 68 +++++++++++++++++++++++++++++++++++++++++
react_week2_fixed/12.md | 39 +++++++++++++++++++++++
react_week2_fixed/13.md | 30 ++++++++++++++++++
react_week2_fixed/14.md | 27 ++++++++++++++++
react_week2_fixed/15.md | 29 ++++++++++++++++++
react_week2_fixed/2.md | 28 +++++++++++++++++
react_week2_fixed/3.md | 49 +++++++++++++++++++++++++++++
react_week2_fixed/4.md | 24 +++++++++++++++
react_week2_fixed/5.md | 28 +++++++++++++++++
react_week2_fixed/6.md | 47 ++++++++++++++++++++++++++++
react_week2_fixed/7.md | 36 ++++++++++++++++++++++
react_week2_fixed/8.md | 26 ++++++++++++++++
react_week2_fixed/9.md | 36 ++++++++++++++++++++++
15 files changed, 519 insertions(+)
create mode 100644 react_week2_fixed/1.md
create mode 100644 react_week2_fixed/10.md
create mode 100644 react_week2_fixed/11.md
create mode 100644 react_week2_fixed/12.md
create mode 100644 react_week2_fixed/13.md
create mode 100644 react_week2_fixed/14.md
create mode 100644 react_week2_fixed/15.md
create mode 100644 react_week2_fixed/2.md
create mode 100644 react_week2_fixed/3.md
create mode 100644 react_week2_fixed/4.md
create mode 100644 react_week2_fixed/5.md
create mode 100644 react_week2_fixed/6.md
create mode 100644 react_week2_fixed/7.md
create mode 100644 react_week2_fixed/8.md
create mode 100644 react_week2_fixed/9.md
diff --git a/react_week2_fixed/1.md b/react_week2_fixed/1.md
new file mode 100644
index 00000000..5af34288
--- /dev/null
+++ b/react_week2_fixed/1.md
@@ -0,0 +1,14 @@
+
+
+# What is JavaScript?
+
+JavaScript is a dynamic programming which can enhance the user's experience and allows the user to interact with the webpage.
+
+JavaScript owes its dynamic identity to the HTML DOM(Document Object Model). The HTML DOM is a tree which sets up what and how HTML is written:
+
+
+
+The HTML DOM is the standard to which you can add, delete and change HTML elements on the webpage.
+
+
+
diff --git a/react_week2_fixed/10.md b/react_week2_fixed/10.md
new file mode 100644
index 00000000..1175ec14
--- /dev/null
+++ b/react_week2_fixed/10.md
@@ -0,0 +1,38 @@
+## .filter()
+
+`.filter()`, like both `.map()` and `.reduce()` is a way to generate values that you'd want.
+
+```javascript
+let button = [
+ {
+ id: 1,
+ text: "Hi!",
+ language: "english" ,
+ },
+ {
+ id: 2,
+ text: "Hola!",
+ language: "spanish" ,
+ },
+ {
+ id: 3,
+ text: "Thanks!",
+ language: "english",
+ },
+ {
+ id: 4,
+ text: "Gracias!",
+ language: "spanish",
+ }
+];
+// we want two arrays, one for the button language that is spanish and the other that is english
+```
+
+We'd create the two arrays like this:
+
+```javascript
+const spanish = button.filter(button => button.language === "spanish");
+const english = button.filter(button => button.language === "english");
+```
+
+This checks if the value in `language` returns true for each function, which would place that value in the array.
\ No newline at end of file
diff --git a/react_week2_fixed/11.md b/react_week2_fixed/11.md
new file mode 100644
index 00000000..4008935d
--- /dev/null
+++ b/react_week2_fixed/11.md
@@ -0,0 +1,68 @@
+## Arrow Functions
+
+ES6 introduced "Arrow Functions", which make using functions easier.
+
+Here's the "Hello World!" as how we did it earlier
+
+``` JavaScript
+document.write("Hello World!");
+```
+
+And here's "Hello World" using an Arrow Function
+
+``` JavaScript
+const hello = () => "Hello World!"
+```
+
+
+Notice that the function got shorter. If the function has one value and has a return function, we can omit the `function` and `return` statement all together.
+
+This provides compactness and clarity to the code.
+
+Let's write this function as an arrow function:
+
+```javascript
+let addition = function (x,y){
+ return x+y
+}
+```
+
+This is how they were traditionally written:
+
+## Functions
+
+A function in JavaScript is a block of code which is designed to do something. When the function is invoked, the code performs a certain task. In the example below, we want to multiply two numbers.
+
+``` javascript
+ let x = buttonFunction(4, 3);
+function buttonFunction = (a, b) => {
+ return a * b;
+}
+```
+
+
+The result will be 12.
+
+When the code hits the `return`, the code will stop executing.
+
+The general format for a function is as follows:
+
+`function name(parameter1, parameter2, parameter3...){`
+
+`code to be executed`
+
+}
+
+Functions are usefull because they can be defined according to our needs and can be used however we see fit.
+
+Make your own function which adds two numbers!
+
+Answer:
+
+```javascript
+let x = buttonAdd(30,50)
+function buttonAdd(a,b){
+ return a+b;
+}
+```
+
diff --git a/react_week2_fixed/12.md b/react_week2_fixed/12.md
new file mode 100644
index 00000000..a3d22cfe
--- /dev/null
+++ b/react_week2_fixed/12.md
@@ -0,0 +1,39 @@
+## Objects
+
+Almost all objects in JavaScript are parts of the keyword `Object`. Objects are usually initialized with the `Object()` method.
+
+ Objects "inherit" their properties from other objects, often called "object prototypes." This inheritance based on linking prototypes together is known as the "prototype chain." Prototypes are defined by `Object.prototype`
+
+Objects can be thought of as a variable that holds many data types in **name:value** pairs. We can access the data stored in objects by calling the name.
+
+```JavaScript
+let button = {
+ name: "color changer",
+ text: "this changes colors",
+ buttonWords: () => this.name + " " + this.text
+ }
+};
+```
+
+We can call the properties in this object in two ways:
+
+```JavaScript
+object.name
+// or
+object['name']
+```
+
+We could call the first name of the `person` variable like this:
+
+```JavaScript
+let name = button.name;
+// or
+let name = button['name'];
+```
+
+We've been using objects and their methods this whole time!
+
+```JavaScript
+console.log("Hello World!")
+```
+
diff --git a/react_week2_fixed/13.md b/react_week2_fixed/13.md
new file mode 100644
index 00000000..255514cb
--- /dev/null
+++ b/react_week2_fixed/13.md
@@ -0,0 +1,30 @@
+## Class Keyword
+
+Classes in JavaScript can be defined using the `Class` keyword. Let's construct our own classes.
+
+``` JavaScript
+class Button {
+ constructor(color,size,content) {
+ this.color = color
+ this.size = size
+ this.content = content
+ }
+
+ print = () => {
+ console.log(color,size,content)
+ }
+}
+// the keyword "this" is a reserved keyword which refers to the current object
+// "this" is not a variable and cannot be changed
+```
+
+Let's create an object using the `new` keyword from the `button` class.
+
+```javascript
+let orderbutton= new button("blue",50,"clickme!")
+orderbutton.print()
+// blue 50 clickme!
+```
+
+Let's make an object `button` which has three elements: font size, font, and color.
+
diff --git a/react_week2_fixed/14.md b/react_week2_fixed/14.md
new file mode 100644
index 00000000..759053a1
--- /dev/null
+++ b/react_week2_fixed/14.md
@@ -0,0 +1,27 @@
+## Events
+
+Events allow the user to interact with the webpage and is what sets JavaScript apart from other languages.
+
+``` JavaScript
+ document.querySelector('html').onclick = function() {
+ alert('Now, this is interactive!');
+```
+
+
+The `querySelector` selects the `` element, setting onclick to a nameless function, which are also called anonymous functions, and generating the alert.
+
+Let's generate another event, one that tells us the date and time:
+
+``` javascript
+function displayDate() {
+ document.getElementById("time").innerHTML = Date();
+}
+```
+
+When run, this little bit of code will allow us to generate the time that it currently is using JavaScript. Of course, we're going to need someway to generate the date and time, and for that we would use the button function in HTML. That's going to be your challenge activity.
+
+Here's a common list of events:
+
+
+
+Construct an event which, on mouseover, will perform an `alert()`
\ No newline at end of file
diff --git a/react_week2_fixed/15.md b/react_week2_fixed/15.md
new file mode 100644
index 00000000..21a134d6
--- /dev/null
+++ b/react_week2_fixed/15.md
@@ -0,0 +1,29 @@
+## Button
+
+With our new knowldge of JavaScript and HTML, let's make a button which on click, which would change colors!
+
+This is one way we can do it:
+
+```html
+
+
+
+```
+
+This is how the button would look like before clicking it:
+
+
+
+And this is the button after it is clicked:
+
+
+
+Let's make another button, which upon mousover, will change colors.
\ No newline at end of file
diff --git a/react_week2_fixed/2.md b/react_week2_fixed/2.md
new file mode 100644
index 00000000..647254e5
--- /dev/null
+++ b/react_week2_fixed/2.md
@@ -0,0 +1,28 @@
+## Introduction to JavaScript
+
+JS is written by inserting a "script" tag into the HTML webpage as shown here:
+
+
+
+
+
+
+## External JS
+
+Although the
+
+
+External JavaScripts can either be put into the head or body part of the DOM. For the rest of the course, we'll be making new files and using external JavaScript in order to initialize the code.
+
+External scripts should not contain the script tag.
\ No newline at end of file
diff --git a/react_week2_fixed/3.md b/react_week2_fixed/3.md
new file mode 100644
index 00000000..fbedac48
--- /dev/null
+++ b/react_week2_fixed/3.md
@@ -0,0 +1,49 @@
+## The If/Else Statements
+
+Let's examine the first one, the `if` and `else` conditional.
+
+```javascript
+
+ let buttonsize = 4;
+ if (buttonsize < 5)
+ {
+ console.log("Button is too small!");
+ }
+ else
+ {
+ console.log("Button is too big!");
+ }
+```
+
+The if/else statemenent checks the condition and then does whatever the specific condition we make it do.
+
+What does the above code block do?
+
+What happens if we have more than one condition?
+
+Enter the "else if" condition
+
+## Else if
+
+The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
+
+``` javascript
+ let buttonsize = 4;
+ if (buttonsize < 5)
+ {
+ document.write("Button is too small!");
+ }
+ else if (buttonsize===5)
+ {
+ alert("Perfect size!");
+ }
+ else
+ {
+ document.write("Button is too big!");
+ }
+```
+
+Recall that `===` is what we use to equate. What does this code block do?
+
+Write an if/else statement which checks to see if button font is bigger than 32 pp, and if it is, it will print("this is large"). However, otherwise, the code will print("this is small!")
+
diff --git a/react_week2_fixed/4.md b/react_week2_fixed/4.md
new file mode 100644
index 00000000..9bf07996
--- /dev/null
+++ b/react_week2_fixed/4.md
@@ -0,0 +1,24 @@
+## Switch
+
+The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
+
+``` javascript
+ const fruit = 'Papayas';
+switch (fruit) {
+ case 'Oranges':
+ comsole.log('Oranges are $0.59 a pound.');
+ break;
+ case 'Papayas':
+ console.log('Papayas are $2.79 a pound.');
+ break;
+ default:
+ console.log('Sorry, we are out of ' + fruit + '.');
+}
+```
+
+We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
+
+Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
+
+When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
+
diff --git a/react_week2_fixed/5.md b/react_week2_fixed/5.md
new file mode 100644
index 00000000..e9c02875
--- /dev/null
+++ b/react_week2_fixed/5.md
@@ -0,0 +1,28 @@
+## Arrays
+
+JavaScript allows arrays, a special type of object.
+
+This is an example of an array:
+
+`let fruit = ["Mango", "Apple", "Banana"]`
+
+It functions as a list. The easiest way to create an array is
+
+`let array_name = [item1, item2, item3...]`
+
+To access an item of an array, we reference the **index number**
+
+`let name = fruit[0]` will return the first item in the array, which is "Mango". In JS, indexing starts at "0", meaning that the first item is referenced as 0.
+
+What happens if we want to change an item in an array? We do this:
+
+`fruit[0]=Watermelon` This assigns the first item to the value "Watermelon"
+
+We can use different methods to perform a variety of functions. For instance, the following block will give us the length of the fruit array.
+
+`let x = fruit.length();`
+
+There are several other methods:
+
+
+
diff --git a/react_week2_fixed/6.md b/react_week2_fixed/6.md
new file mode 100644
index 00000000..b8df7857
--- /dev/null
+++ b/react_week2_fixed/6.md
@@ -0,0 +1,47 @@
+## Loops
+
+For loops iterate a certain amount of times, often dictated by the amount of items in an array. Let's look at an example and dissect it from there:
+
+JavaScript writes a for loop like this:
+
+You've probably seen for loops written similarly from other language:
+
+``` javascript
+ let buttoncolor = ["Red", "Blue", "Green", "Yellow", "Maroon", "Black"];
+ let i;
+ for (i = 0; i < buttonColor.length; i++) {
+ console.log(buttonColor[i] + ", ")
+ }
+ while (i < buttonColor.length) {
+
+ }
+
+```
+
+This script will iterate 5 times and will print this: `Red, Blue, Green, Yellow, Maroon, Black`
+
+where x is executed once before the code block, y defines the condition to the execution of the code block, and z executes after the code block has been executed.
+
+To exit out of a loop, use the `break` keyword and to skip to the next iteration, use the `continue` keyword.
+
+Instead of using the traditional for loop, JavaScript provides an easier-to-read loop:
+
+
+
+## For Each Loop
+
+The For Each loop is a way to iterate through an object's properties.
+
+```javascript
+let sum = 0;
+let obj = {prop1: 5, prop2: 13, prop3: 8};
+
+for each (let item in obj) {
+ sum += item;
+}
+
+console.log(sum); // logs "26", which is 5+13+8
+```
+
+
+
diff --git a/react_week2_fixed/7.md b/react_week2_fixed/7.md
new file mode 100644
index 00000000..a965517f
--- /dev/null
+++ b/react_week2_fixed/7.md
@@ -0,0 +1,36 @@
+## While Loops
+
+While loops iterate through the loop for as long as the condition is true. Let's look at an example:
+
+``` javascript
+ let buttontext = "";
+ let i = 0;
+ while (i < 10) {
+ buttontext += " The number is " + i;
+ i++;
+}
+console.log(buttontext)
+```
+
+This loop iterates 0-9 times, so our result will look like this:
+
+`The number is 0
+The number is 1` and so forth. The while loop iterated until i became 10, and then stopped iterating. The `i++` function adds 1 to i and increments it. `i--` would decrement the code.
+
+The general format of the while loop is as follows:
+
+`while (condition) {`
+
+`code to be executed`
+
+`}`
+
+What would this print?
+
+```javascript
+let button="";
+let x=0;
+while(x<10){
+ console.log(x)
+}
+```
\ No newline at end of file
diff --git a/react_week2_fixed/8.md b/react_week2_fixed/8.md
new file mode 100644
index 00000000..799dcf84
--- /dev/null
+++ b/react_week2_fixed/8.md
@@ -0,0 +1,26 @@
+## .map()
+
+
+
+Using the `map()` keyword simplifies the indexing of arrays and returns the value you want.
+Let's assume that you recieve an array with the name and age of several people. However, you only want the ages of the people.
+
+```javascript
+let button = [
+ { color: "blue", text: 'click me!' },
+ { color: "red", text: 'test button' },
+ { color: "black", text: 'generate!' },
+ { color: "green", text: 'see results!' }
+];
+// we want the color of the button
+```
+
+You can use `.map()` to return the color of this object.
+
+```javascript
+const buttoncolor = button.map(button => button.color);
+```
+
+`.map` looks through each individual element of an array and returns only what we are looking for.
+
+Write a `.map()` function to return the text in this object.
\ No newline at end of file
diff --git a/react_week2_fixed/9.md b/react_week2_fixed/9.md
new file mode 100644
index 00000000..d8415422
--- /dev/null
+++ b/react_week2_fixed/9.md
@@ -0,0 +1,36 @@
+## .reduce()
+
+Just like `.map()`, `.reduce()` looks through all the elements in an array but only returns one value that you want. Let's look at an example:
+
+```javascript
+let button = [
+ {
+ id: 1,
+ text: "1",
+ value: 1,
+ },
+ {
+ id: 2,
+ text: "+",
+ value: 0 ,
+ },
+ {
+ id: 3,
+ text: "2",
+ value: 2,
+ }
+];
+// we want the largest value in this array
+```
+
+Using `.reduce()`, we'll be able to find the oldest person in the array:
+
+```javascript
+let largestvalue = button.reduce(function (largevalue, button) {
+ return (largevalue.value || 0) > button.value ? largevalue : button;
+}, {});
+```
+
+Naming the accumulator `largevalue` is a way to check each element in an array. If one value is larger than the other, then that value becomes the new `largevalue`.
+
+Use `.reduce()` to find the youngest person in the array.
\ No newline at end of file
From 5c24606ad270e52f385bc77aea66314df6218ae8 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:22:01 -0800
Subject: [PATCH 104/123] Delete 18.md
---
18.md | 36 ------------------------------------
1 file changed, 36 deletions(-)
delete mode 100644 18.md
diff --git a/18.md b/18.md
deleted file mode 100644
index d8415422..00000000
--- a/18.md
+++ /dev/null
@@ -1,36 +0,0 @@
-## .reduce()
-
-Just like `.map()`, `.reduce()` looks through all the elements in an array but only returns one value that you want. Let's look at an example:
-
-```javascript
-let button = [
- {
- id: 1,
- text: "1",
- value: 1,
- },
- {
- id: 2,
- text: "+",
- value: 0 ,
- },
- {
- id: 3,
- text: "2",
- value: 2,
- }
-];
-// we want the largest value in this array
-```
-
-Using `.reduce()`, we'll be able to find the oldest person in the array:
-
-```javascript
-let largestvalue = button.reduce(function (largevalue, button) {
- return (largevalue.value || 0) > button.value ? largevalue : button;
-}, {});
-```
-
-Naming the accumulator `largevalue` is a way to check each element in an array. If one value is larger than the other, then that value becomes the new `largevalue`.
-
-Use `.reduce()` to find the youngest person in the array.
\ No newline at end of file
From da8e08b3bd578e27acc50c2e16915f02491410a0 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:22:09 -0800
Subject: [PATCH 105/123] Delete 19.md
---
19.md | 38 --------------------------------------
1 file changed, 38 deletions(-)
delete mode 100644 19.md
diff --git a/19.md b/19.md
deleted file mode 100644
index 1175ec14..00000000
--- a/19.md
+++ /dev/null
@@ -1,38 +0,0 @@
-## .filter()
-
-`.filter()`, like both `.map()` and `.reduce()` is a way to generate values that you'd want.
-
-```javascript
-let button = [
- {
- id: 1,
- text: "Hi!",
- language: "english" ,
- },
- {
- id: 2,
- text: "Hola!",
- language: "spanish" ,
- },
- {
- id: 3,
- text: "Thanks!",
- language: "english",
- },
- {
- id: 4,
- text: "Gracias!",
- language: "spanish",
- }
-];
-// we want two arrays, one for the button language that is spanish and the other that is english
-```
-
-We'd create the two arrays like this:
-
-```javascript
-const spanish = button.filter(button => button.language === "spanish");
-const english = button.filter(button => button.language === "english");
-```
-
-This checks if the value in `language` returns true for each function, which would place that value in the array.
\ No newline at end of file
From 35762f51ba357fc11e02fd89ebba01335122091c Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:22:17 -0800
Subject: [PATCH 106/123] Delete 2.md
---
2.md | 43 -------------------------------------------
1 file changed, 43 deletions(-)
delete mode 100644 2.md
diff --git a/2.md b/2.md
deleted file mode 100644
index a75a099b..00000000
--- a/2.md
+++ /dev/null
@@ -1,43 +0,0 @@
-## Introduction to JavaScript
-
-JS is written by inserting a "script" tag into the HTML webpage as shown here:
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-The script tag can be placed in either the header tag or the body tag.
-
-Now that you know how JavaScript looks like internally on the webpage, let's create the classic Hello World function in Java Script using the document.write() function.
-
-
-
-
-
-
-
-**Always** remember to add semicolons at the end of each line because that's how the script knows to end reading the line.
-
-
-
-
-
-
-
-
-
From 78238fea23ab3c104ac9f887310ef950c1a3637f Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:22:29 -0800
Subject: [PATCH 107/123] Delete 20.md
---
20.md | 29 -----------------------------
1 file changed, 29 deletions(-)
delete mode 100644 20.md
diff --git a/20.md b/20.md
deleted file mode 100644
index 21a134d6..00000000
--- a/20.md
+++ /dev/null
@@ -1,29 +0,0 @@
-## Button
-
-With our new knowldge of JavaScript and HTML, let's make a button which on click, which would change colors!
-
-This is one way we can do it:
-
-```html
-
-
-
-```
-
-This is how the button would look like before clicking it:
-
-
-
-And this is the button after it is clicked:
-
-
-
-Let's make another button, which upon mousover, will change colors.
\ No newline at end of file
From 0b065a38f44cb3e86cd3f90d704fd254d6ee8176 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:22:45 -0800
Subject: [PATCH 108/123] Delete 3.md
---
3.md | 18 ------------------
1 file changed, 18 deletions(-)
delete mode 100644 3.md
diff --git a/3.md b/3.md
deleted file mode 100644
index 75d70430..00000000
--- a/3.md
+++ /dev/null
@@ -1,18 +0,0 @@
-## External JS
-
-Although the
-
-External JavaScripts can either be put into the head or body part of the DOM. For the rest of the course, we'll be making new files and using external JavaScript in order to initialize the code.
-
-External scripts should not contain the script tag.
\ No newline at end of file
From 2f990abe751216bd88d5e492451629eed58ec48e Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:22:53 -0800
Subject: [PATCH 109/123] Delete 4.md
---
4.md | 24 ------------------------
1 file changed, 24 deletions(-)
delete mode 100644 4.md
diff --git a/4.md b/4.md
deleted file mode 100644
index fedda1e8..00000000
--- a/4.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## The If/Else Statements
-
-Let's examine the first one, the `if` and `else` conditional.
-
-```javascript
-
- let buttonsize = 4;
- if (buttonsize < 5)
- {
- document.write("Button is too small!");
- }
- else
- {
- document.write("Button is too big!");
- }
-```
-
-The if/else statemenent checks the condition and then does whatever the specific condition we make it do.
-
-What does the above code block do?
-
-What happens if we have more than one condition?
-
-Enter the "else if" condition
\ No newline at end of file
From 98fe8d2b66029cd475f8504deb64b1da57ff75b4 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:23:00 -0800
Subject: [PATCH 110/123] Delete 5.md
---
5.md | 25 -------------------------
1 file changed, 25 deletions(-)
delete mode 100644 5.md
diff --git a/5.md b/5.md
deleted file mode 100644
index c998af0e..00000000
--- a/5.md
+++ /dev/null
@@ -1,25 +0,0 @@
-## Else if
-
-The `else if` condition is used if the first condition is false. Let's modify our code so that we can use an `else if` function.
-
-``` javascript
-
- let buttonsize = 4;
- if (buttonsize < 5)
- {
- document.write("Button is too small!");
- }
- else if (buttonsize===5)
- {
- alert("Perfect size!");
- }
- else
- {
- document.write("Button is too big!");
- }
-```
-
-Recall that `===` is what we use to equate. What does this code block do?
-
-Write an if/else statement which checks to see if button font is bigger than 32 pp, and if it is, it will print("this is large"). However, otherwise, the code will print("this is small!")
-
From 72cb7f24d47724b0052dd7f7a088f91f9eed5788 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:23:08 -0800
Subject: [PATCH 111/123] Delete 6.md
---
6.md | 24 ------------------------
1 file changed, 24 deletions(-)
delete mode 100644 6.md
diff --git a/6.md b/6.md
deleted file mode 100644
index 192c3963..00000000
--- a/6.md
+++ /dev/null
@@ -1,24 +0,0 @@
-## Switch
-
-The switch statements evaluates the variable and looks for `cases` which would match the initial condition.
-
-``` javascript
- const fruit = 'Papayas';
-switch (fruit) {
- case 'Oranges':
- document.write('Oranges are $0.59 a pound.');
- break;
- case 'Papayas':
- document.write('Papayas are $2.79 a pound.');
- break;
- default:
- document.write('Sorry, we are out of ' + fruit + '.');
-}
-```
-
-We set "fruit" to Papayas, which means that the script will evaluate each case until it finds the appropriate case, and then it will execute that case.
-
-Note that switch statements have a `default`, which is what the script will default to if the condition doesn't have an associated case.
-
-When writing a switch statement, don't forget to include a `break` which would "break" out of the conditional once if has executed the condition. A more-indepth look will be provided when we go over loops.
-
From eb7a57a5e4a53100d5e2c08ddcb3e775c3bbeb4f Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:23:16 -0800
Subject: [PATCH 112/123] Delete 7.md
---
7.md | 37 -------------------------------------
1 file changed, 37 deletions(-)
delete mode 100644 7.md
diff --git a/7.md b/7.md
deleted file mode 100644
index 4aceec5d..00000000
--- a/7.md
+++ /dev/null
@@ -1,37 +0,0 @@
-## For Loops
-
-For loops iterate a certain amount of times, often dictated by the amount of items in an array. Let's look at an example and dissect it from there:
-
-``` javascript
- let buttoncolor = ["Red", "Blue", "Green", "Yellow", "Maroon", "Black"];
- let i;
- for (i = 0; i < buttoncolor.length; i++) {
- document.write(buttoncolor[i] + ", ")
- }
-```
-
-This script will iterate 5 times and will print this: `Red, Blue, Green, Yellow, Maroon, Black`
-
-Recall that arrays start indexing their first item as buttoncolor[0]. This means that buttoncolor[5] becomes `Black`. Hence, we can print all of the array.
-
-The general format of the for loop is as follows:
-
-`for (x,y,z){`
-
-`code to be executed`
-
-`}`
-
-where x is executed once before the code block, y defines the condition to the execution of the code block, and z executes after the code block has been executed.
-
-What will this print?
-
-```javascript
-let buttonsizes=["10","20","30","40"];
-let x;
-for (x=2; x<3; x++){
- document.write(buttonsizes[i]+",")
-}
-```
-
-Remember that the first value in JavaScript is actually 0!
\ No newline at end of file
From 0620aa47059cf5a76a428a916c034f31fef03734 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Tue, 3 Mar 2020 20:23:24 -0800
Subject: [PATCH 113/123] Delete 8.md
---
8.md | 36 ------------------------------------
1 file changed, 36 deletions(-)
delete mode 100644 8.md
diff --git a/8.md b/8.md
deleted file mode 100644
index be9624f4..00000000
--- a/8.md
+++ /dev/null
@@ -1,36 +0,0 @@
-## While Loops
-
-While loops iterate through the loop for as long as the condition is true. Let's look at an example:
-
-``` javascript
- let buttontext = "";
- let i = 0;
- while (i < 10) {
- buttontext += " The number is " + i;
- i++;
-}
-document.write(buttontext)
-```
-
-This loop iterates 0-9 times, so our result will look like this:
-
-`The number is 0
-The number is 1` and so forth. The while loop iterated until i became 10, and then stopped iterating. The `i++` function adds 1 to i and increments it. `i--` would decrement the code.
-
-The general format of the while loop is as follows:
-
-`while (condition) {`
-
-`code to be executed`
-
-`}`
-
-What would this print?
-
-```javascript
-let button="";
-let x=0;
-while(x<10){
- document.write(x)
-}
-```
\ No newline at end of file
From 796a64a0c4ecb1ea324d58cd8d225525677e1850 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Fri, 27 Mar 2020 09:04:25 -0700
Subject: [PATCH 114/123] Create mongodb_cirriculum
---
mongodb_cirriculum | 1 +
1 file changed, 1 insertion(+)
create mode 100644 mongodb_cirriculum
diff --git a/mongodb_cirriculum b/mongodb_cirriculum
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/mongodb_cirriculum
@@ -0,0 +1 @@
+
From 112cdab730b8e8e61e153b324ccae1fa34c464bc Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Fri, 27 Mar 2020 09:04:45 -0700
Subject: [PATCH 115/123] Delete mongodb_cirriculum
---
mongodb_cirriculum | 1 -
1 file changed, 1 deletion(-)
delete mode 100644 mongodb_cirriculum
diff --git a/mongodb_cirriculum b/mongodb_cirriculum
deleted file mode 100644
index 8b137891..00000000
--- a/mongodb_cirriculum
+++ /dev/null
@@ -1 +0,0 @@
-
From d761f3caec91b0cba6f82efc80c1acefc33eb063 Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Fri, 27 Mar 2020 09:05:54 -0700
Subject: [PATCH 116/123] Create mongodb_cirriculum
---
mongodb_cirriculum | 1 +
1 file changed, 1 insertion(+)
create mode 100644 mongodb_cirriculum
diff --git a/mongodb_cirriculum b/mongodb_cirriculum
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/mongodb_cirriculum
@@ -0,0 +1 @@
+
From 702548213322c46c6be315eb9d0aa5810be0463a Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Fri, 27 Mar 2020 09:07:51 -0700
Subject: [PATCH 117/123] Create mongodb_cirriculum
---
mongodb_cirriculum | 1 +
1 file changed, 1 insertion(+)
create mode 100644 mongodb_cirriculum
diff --git a/mongodb_cirriculum b/mongodb_cirriculum
new file mode 100644
index 00000000..8b137891
--- /dev/null
+++ b/mongodb_cirriculum
@@ -0,0 +1 @@
+
From 0355ecc461d719b4d839c45b3657c0333c9d7e8f Mon Sep 17 00:00:00 2001
From: vvennela <60056256+vvennela@users.noreply.github.com>
Date: Fri, 27 Mar 2020 09:08:35 -0700
Subject: [PATCH 118/123] Add files via upload
---
MONGODB/F1.2.md | 37 +++++++++++++++++
MONGODB/F1.3.md | 34 +++++++++++++++
MONGODB/F1.4.md | 108 ++++++++++++++++++++++++++++++++++++++++++++++++
MONGODB/F1.5.md | 27 ++++++++++++
4 files changed, 206 insertions(+)
create mode 100644 MONGODB/F1.2.md
create mode 100644 MONGODB/F1.3.md
create mode 100644 MONGODB/F1.4.md
create mode 100644 MONGODB/F1.5.md
diff --git a/MONGODB/F1.2.md b/MONGODB/F1.2.md
new file mode 100644
index 00000000..075b83db
--- /dev/null
+++ b/MONGODB/F1.2.md
@@ -0,0 +1,37 @@
+# F1.1 An Introduction to MongoDB and Atlas
+
+MongoDB is a database program which is used for high-volume data storage. Databases allow for the storage and retrieval of data.
+
+A database is needed for dynamic websites, as they rely on data in order to function. Examples of dynamic websites include Quora, and Gmail, as they both store data and retrieve it. Static websites such as personal websites, do not need databases because they do not have to retieve any data.
+
+MongoDB has three distinct components, each with their own unique tools: Atlas, Compass, and Stitch.
+
+## Atlas
+
+MongoDB Atlas handles the deployment of your database, using the cloud provider of your choice. Let's get started.
+
+First, sign up for MongoDB on this site: "https://www.mongodb.com/cloud/atlas?tck=docs_atlas"
+
+This is how the webpage should look:
+
+
+
+
+
+Hit the "Try Free" button and sign up. Your screen should then look like this:
+
+
+
+
+
+ Choose the "Starter Clusters" Option and Create a cluster! A cluster is essentially a collection of various nodes, which each handle different parts of data. The main advantage that comes with using a cluster is that nodes are mainly independent of each other and can be examined seperately.
+
+Then, choose your cluster and your region (US-WEST) and hit "Create Cluster"
+
+
+
+Your screen should finally end up looking like this:
+
+
+
+MongoDB uses collections in order to store data, which are basically like tables.
\ No newline at end of file
diff --git a/MONGODB/F1.3.md b/MONGODB/F1.3.md
new file mode 100644
index 00000000..ae43ad5f
--- /dev/null
+++ b/MONGODB/F1.3.md
@@ -0,0 +1,34 @@
+# F1.2: Introduction to Stitch + Using Stitch
+
+Another component of MongoDB is using Stich, which allows you to configure rules, authentication and other services for your services. To fully understand Stitch, let's build a blog which allows you to post and edit comments.
+
+Make sure you've created your cluster and your account to access and finish this tutorial.
+
+## Step 1: Creating a Stitch Application
+
+1. On the left, click Stitch and create a new application and give it a name(ie StichEx)
+
+ 
+
+2. After waiting a few minutes to initalize, you should reach the starting screen(again):
+
+ ##
+
+## Step 2: Authentication
+
+On the starting page, scroll down and turn on "Anonymous Authentication." There are other ways to configure authentication, such as through Google or through username and password authentication.
+
+
+
+## Step 3: Setting Rules for the Application
+
+1. On the Stich Homepage, click "Rules"
+2. Add a collection and set the database name to "Comment Ex"
+3. Set the collection name to comments
+4. Select "No Template" and add collection
+5. Under the "default" column, tick both "read" and "write" so the database can store comments
+6. Click "save"
+
+
+
+7. Finally, deploy your application.
\ No newline at end of file
diff --git a/MONGODB/F1.4.md b/MONGODB/F1.4.md
new file mode 100644
index 00000000..9a949cfa
--- /dev/null
+++ b/MONGODB/F1.4.md
@@ -0,0 +1,108 @@
+# F1.3: Creating the webpage for the Stitch Application
+
+Let's generate an HTML page so we can comment on the blog.
+
+## Step 1: Creating the HTML page
+
+Create an HTML file and copy the following onto it:
+
+```html
+
+
+
+
+
My First Blog
+
+ Hi! This is an example of how to use Stitch!
+
+
+
+
+
+```
+
+## Step 2: Include the Stitch SDK
+
+Include the following
+```
+
+## Step 3: Initialize the Stitch client
+
+Paste this below the SDK in the head tag:
+
+Replace the "" with your app id, which you can find on the clients page of the Stitch homepage
+
+```javascript
+
+```
+
+## Step 4: Displaying Comments
+
+Add the following functions to the
-```
-
-## Step 3: Initialize the Stitch client
-
-Paste this below the SDK in the head tag:
-
-Replace the "" with your app id, which you can find on the clients page of the Stitch homepage
-
-```javascript
-
-```
-
-## Step 4: Displaying Comments
-
-Add the following functions to the
+```
+
+## Step 3: Initialize the Stitch client
+
+Paste this below the SDK in the head tag:
+
+Replace the "" with your app id, which you can find on the clients page of the Stitch homepage
+
+```javascript
+
+```
+
+## Step 4: Displaying Comments
+
+Add the following functions to the