diff --git a/starter-code/SpecRunner.html b/starter-code/SpecRunner.html
index 73c156ffd..2c030633b 100644
--- a/starter-code/SpecRunner.html
+++ b/starter-code/SpecRunner.html
@@ -14,7 +14,7 @@
-
+
diff --git a/starter-code/jasmine/jasmine-2.8.0/jasmine-html.js b/starter-code/jasmine/jasmine-2.8.0/jasmine-html.js
index 9b32bf2c1..4bc918828 100644
--- a/starter-code/jasmine/jasmine-2.8.0/jasmine-html.js
+++ b/starter-code/jasmine/jasmine-2.8.0/jasmine-html.js
@@ -7,7 +7,7 @@ a copy of this software and associated documentation files (the
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
+the following conditions:B
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
diff --git a/starter-code/src/functions-and-arrays.js b/starter-code/src/functions-and-arrays.js
index 720d3dcf5..27ca30dc6 100644
--- a/starter-code/src/functions-and-arrays.js
+++ b/starter-code/src/functions-and-arrays.js
@@ -1,20 +1,122 @@
// Iteration #1: Find the maximum
+function maxOfTwoNumbers(num1,num2) {
+ if (num1>num2) {
+ return num1;
+ } else if (num1=0; i--) {
+ if (arr[i].length >= longestWord.length) {
+ longestWord = arr[i];
+ }
+ }
+ return longestWord;
+ }
+
// Iteration #3: Calculate the sum
const numbers = [6, 12, 1, 18, 13, 16, 2, 1, 8, 10];
+function sumNumbers(arr) {
+ var sum = 0;
+ for (var i=0; i< arr.length; i++) {
+ sum += arr[i];
+ }
+return sum;
+}
+
+// Iteration #3: BONUS
+
+ mixedArr = [6, 12, 'miami', 1, true, 'barca', '200', 'lisboa', 8, 10];
+
+function sum (arr) {
+ var sum = 0;
+ for (var i=0; i< arr.length; i++) {
+ if (typeof arr[i] === "string") {
+ sum += arr[i].length;
+ } else if (typeof arr[i] === "number"){
+ sum += arr[i];
+ } else if (typeof arr[i] === "boolean") {
+ if (true) {
+ sum += 333
+ } else if (false) {
+ sum += 0
+ }
+ } else {
+ throw "Error";
+ }
+}
+return sum;
+}
+
+
// Iteration #4: Calculate the average
// Level 1: Array of numbers
const numbersAvg = [2, 6, 9, 10, 7, 4, 1, 9];
+function averageNumbers(arr) {
+ if (arr.length == 0) {
+ return null;
+ }
+ return sumNumbers(arr) / arr.length;
+}
+
+
// Level 2: Array of strings
const wordsArr = ['seat', 'correspond', 'linen', 'motif', 'hole', 'smell', 'smart', 'chaos', 'fuel', 'palace'];
+function averageWordLength(arr) {
+var sumOfLetters = 0;
+if (arr.length == 0) {
+ return null;
+}
+for (var i=0; i