diff --git a/.editorconfig b/.editorconfig old mode 100644 new mode 100755 diff --git a/.gitignore b/.gitignore old mode 100644 new mode 100755 diff --git a/.learn b/.learn old mode 100644 new mode 100755 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md old mode 100644 new mode 100755 diff --git a/LICENSE.md b/LICENSE.md old mode 100644 new mode 100755 diff --git a/README.md b/README.md old mode 100644 new mode 100755 diff --git a/index.html b/index.html old mode 100644 new mode 100755 diff --git a/index.js b/index.js old mode 100644 new mode 100755 index 695b9e17a..5b69699f5 --- a/index.js +++ b/index.js @@ -1 +1,48 @@ const app = "I don't do much." + +var kittens = ["Milo", "Otis", "Garfield"]; +function Arrays() { + return kittens; +} + + +function kittens() { + var Kittens = ["Milo", "Otis", "Garfield"]; + return Kittens; +} + +function destructivelyAppendKitten(name) { + kittens.push(name); + return kittens; +} + +function destructivelyPrependKitten(name) { + kittens.unshift(name); + return kittens; +} + +function destructivelyRemoveLastKitten(name) { + kittens.pop(kittens.length-1); + return kittens; +} + +function destructivelyRemoveFirstKitten(){ + kittens.shift(); + return kittens; +} + +function appendKitten(name) { +return [...kittens,name]; +} + +function prependKitten(name) { + return [name,...kittens]; +} + +function removeLastKitten() { +return kittens.slice(0,2); +} + +function removeFirstKitten() { + return kittens.slice(1,3); +} diff --git a/package.json b/package.json old mode 100644 new mode 100755 diff --git a/test/index-test.js b/test/index-test.js old mode 100644 new mode 100755 diff --git a/test/mocha.opts b/test/mocha.opts old mode 100644 new mode 100755 diff --git a/test/root.js b/test/root.js old mode 100644 new mode 100755