From b04ffc877423aa9952991b41d44792537565ca3a Mon Sep 17 00:00:00 2001 From: melber Date: Fri, 21 Sep 2018 12:04:06 +1000 Subject: [PATCH 1/3] created folders and files --- scoobies/angel.txt | 0 scoobies/buffy.txt | 0 scoobies/giles.txt | 0 vamps/angel.txt | 0 4 files changed, 0 insertions(+), 0 deletions(-) create mode 100644 scoobies/angel.txt create mode 100644 scoobies/buffy.txt create mode 100644 scoobies/giles.txt create mode 100644 vamps/angel.txt diff --git a/scoobies/angel.txt b/scoobies/angel.txt new file mode 100644 index 0000000..e69de29 diff --git a/scoobies/buffy.txt b/scoobies/buffy.txt new file mode 100644 index 0000000..e69de29 diff --git a/scoobies/giles.txt b/scoobies/giles.txt new file mode 100644 index 0000000..e69de29 diff --git a/vamps/angel.txt b/vamps/angel.txt new file mode 100644 index 0000000..e69de29 From d0a1ebef87c28c763de4cf0530df22b611a485c8 Mon Sep 17 00:00:00 2001 From: melber Date: Fri, 21 Sep 2018 12:04:37 +1000 Subject: [PATCH 2/3] deleted vamps directory --- vamps/angel.txt | 0 1 file changed, 0 insertions(+), 0 deletions(-) delete mode 100644 vamps/angel.txt diff --git a/vamps/angel.txt b/vamps/angel.txt deleted file mode 100644 index e69de29..0000000 From 56dc3d4c370f19d9bc315477b770ec669b73e461 Mon Sep 17 00:00:00 2001 From: melber Date: Fri, 21 Sep 2018 12:43:05 +1000 Subject: [PATCH 3/3] week 1 checkpoint --- arrays.html | 12 ++++++++++++ arrays.js | 5 +++++ conditionals.html | 12 ++++++++++++ conditionals.js | 6 ++++++ functions.html | 12 ++++++++++++ functions.js | 9 +++++++++ objects.html | 12 ++++++++++++ objects.js | 8 ++++++++ variables.html | 12 ++++++++++++ variables.js | 2 ++ 10 files changed, 90 insertions(+) create mode 100644 arrays.html create mode 100644 arrays.js create mode 100644 conditionals.html create mode 100644 conditionals.js create mode 100644 functions.html create mode 100644 functions.js create mode 100644 objects.html create mode 100644 objects.js create mode 100644 variables.html create mode 100644 variables.js diff --git a/arrays.html b/arrays.html new file mode 100644 index 0000000..f57164f --- /dev/null +++ b/arrays.html @@ -0,0 +1,12 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git a/arrays.js b/arrays.js new file mode 100644 index 0000000..af0a08c --- /dev/null +++ b/arrays.js @@ -0,0 +1,5 @@ +var weekend = ['Saturday']; +weekend.push('Sunday'); +weekend.unshift('Friday'); +var day = weekend[1]; +weekend.shift(); \ No newline at end of file diff --git a/conditionals.html b/conditionals.html new file mode 100644 index 0000000..7f3c11d --- /dev/null +++ b/conditionals.html @@ -0,0 +1,12 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git a/conditionals.js b/conditionals.js new file mode 100644 index 0000000..74bb602 --- /dev/null +++ b/conditionals.js @@ -0,0 +1,6 @@ +var souls = 3; +var lifeRafts = 2; + +if (souls > lifeRafts) { + console.log("SOS!"); +} \ No newline at end of file diff --git a/functions.html b/functions.html new file mode 100644 index 0000000..d9e1f37 --- /dev/null +++ b/functions.html @@ -0,0 +1,12 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git a/functions.js b/functions.js new file mode 100644 index 0000000..0e58333 --- /dev/null +++ b/functions.js @@ -0,0 +1,9 @@ +function rectangleArea(length, width) { + if (length > 0 && width > 0) { + return result = length * width; + } else { + return 0; + } +} + +console.log(rectangleArea(2,7)); \ No newline at end of file diff --git a/objects.html b/objects.html new file mode 100644 index 0000000..487f23f --- /dev/null +++ b/objects.html @@ -0,0 +1,12 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git a/objects.js b/objects.js new file mode 100644 index 0000000..b3a8b72 --- /dev/null +++ b/objects.js @@ -0,0 +1,8 @@ +var brain = { + energyLevel: 10 +}; + +var energy = brain.energyLevel; +brain.dream = "electric sheep"; +brain.dayDream = {lunch: ['burger', 'beef']}; +brain.dayDream.lunch.push("pudding"); \ No newline at end of file diff --git a/variables.html b/variables.html new file mode 100644 index 0000000..173234e --- /dev/null +++ b/variables.html @@ -0,0 +1,12 @@ + + + + + + + Document + + + + + \ No newline at end of file diff --git a/variables.js b/variables.js new file mode 100644 index 0000000..c5c1070 --- /dev/null +++ b/variables.js @@ -0,0 +1,2 @@ +var captain = "Jack"; +var phrase = "Oh " + captain + ", my " + captain + "!"; \ No newline at end of file