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/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/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