diff --git a/index.html b/index.html
index b16c318..45353df 100644
--- a/index.html
+++ b/index.html
@@ -20,16 +20,16 @@
Loops Exercises
diff --git a/js/script.js b/js/script.js
index ba8cf69..65ad0fe 100644
--- a/js/script.js
+++ b/js/script.js
@@ -2,6 +2,117 @@
var display = document.getElementById("display");
-function yourFunctionName (){
- display.innerHTML = "hello";
+function oneToTen (){
+ var output = "*** Output ***
oneToTen()";
+ for(i=1; i<11; i++){
+ output += "
" + i;
+ }
+ display.innerHTML = output;
+}
+
+function oddNumbers (){
+ var output = "*** Output ***
oddNumbers()";
+ for(i=1; i<21; i++){
+ if(i%2 != 0){
+ output += "
" + i;
+ }
+ }
+ display.innerHTML = output;
+}
+
+function squares (){
+ var output = "*** Output ***
squares()";
+ for(i=1; i<11; i++){
+ output += "
" + (i*i);
+ }
+ display.innerHTML = output;
+}
+
+function random4 (){
+ var output = "*** Output ***
random4()";
+
+ for(i=1; i<5; i++){
+ output += "
" + Math.floor((Math.random()*10)+1);
+ }
+ display.innerHTML = output;
+}
+
+function even (n){
+ var output = "*** Output ***
even("+n+")";
+
+ for(i=1; i" + i;
+ }
+ }
+ display.innerHTML = output;
+}
+
+function powers (n){
+ var output = "*** Output ***
powers("+n+")";
+
+ for(i=1; i" + Math.pow(2, i);
+ }
+ display.innerHTML = output;
+}
+
+function areWeThereYet (){
+ var input = prompt("Are we there yet?");
+
+ while(input.toUpperCase() !== "YES")
+ {
+ input = prompt("Are we there yet?");
+ }
+
+ display.innerHTML = "Good!";
+}
+
+function triangle (){
+ var output = "*** Output ***
triangle()
"
+ for(i=1; i<6; i++){
+ for(j=1; j";
+ }
+ display.innerHTML = output.trim();
+}
+
+function tableSquare (){
+ var output = "*** Output ***
tableSquare()
A 4 x 4 table square
";
+
+ for (i = 1; i < 5; i++){
+ for (j = 1; j < 5; j++){
+ if (i*j < 10 && j>=3){
+ output += "| " +" " +" " + i * j + " ";
+ }else{
+ output += "| " + i * j + " ";
+ }
+ }
+ output += "|
";
+ }
+ display.innerHTML = output.trim();
+}
+
+function tableSquares (n){
+ var output = "*** Output ***
tableSquares()
A " + n + " x " + n + " table square
";
+
+ for (var i = 1; i <= n; i++) {
+ for (var j = 1; j <= n; j++) {
+ output += "| " + addSpace((i*j), (j*n)) + (i * j) + " ";
+ }
+ output += "|
";
+ }
+ display.innerHTML = output.trim();
+}
+
+function addSpace(currentNum, lastNumInCol){
+ var space = " ";
+ var diff = lastNumInCol.toString().length-currentNum.toString().length;
+
+ for (i = 0; i < diff ; i++){
+ space += " "+" ";
+ }
+ return space;
}