From 83bea10d35bdf2e0ccb9154a373be58909c008f8 Mon Sep 17 00:00:00 2001 From: ankor Date: Tue, 11 Jun 2019 09:19:45 +0000 Subject: [PATCH] Add stub files to exercises (#679) Date: Tue Jun 11 09:19:45 2019 +0000 --- exercises/accumulate/accumulate.js | 8 +++ exercises/acronym/acronym.js | 8 +++ exercises/all-your-base/all-your-base.js | 8 +++ exercises/allergies/allergies.js | 18 +++++++ exercises/anagram/anagram.js | 14 +++++ .../armstrong-numbers/armstrong-numbers.js | 8 +++ exercises/beer-song/beer-song.js | 14 +++++ .../binary-search-tree/binary-search-tree.js | 25 +++++++++ exercises/binary/binary.js | 14 +++++ exercises/clock/clock.js | 22 ++++++++ .../collatz-conjecture/collatz-conjecture.js | 8 +++ exercises/complex-numbers/complex-numbers.js | 46 ++++++++++++++++ exercises/custom-set/custom-set.js | 46 ++++++++++++++++ exercises/darts/darts.js | 8 +++ exercises/diamond/diamond.js | 10 ++++ .../difference-of-squares.js | 22 ++++++++ exercises/diffie-hellman/diffie-helman.js | 18 +++++++ exercises/dnd-character/dnd-character.js | 42 +++++++++++++++ exercises/etl/etl.js | 8 +++ exercises/flatten-array/flatten-array.js | 10 ++++ exercises/food-chain/food-chain.js | 14 +++++ exercises/gigasecond/gigasecond.js | 8 +++ exercises/grade-school/grade-school.js | 18 +++++++ exercises/grains/grains.js | 14 +++++ exercises/hamming/hamming.js | 8 +++ exercises/hexadecimal/hexadecimal.js | 8 +++ exercises/high-scores/high-scores.js | 26 ++++++++++ exercises/house/house.js | 14 +++++ exercises/isbn-verifier/isbn-verifier.js | 14 +++++ exercises/isogram/isogram.js | 8 +++ .../largest-series-product.js | 8 +++ exercises/leap/leap.js | 8 +++ exercises/linked-list/linked-list.js | 30 +++++++++++ exercises/list-ops/list-ops.js | 42 +++++++++++++++ exercises/luhn/luhn.js | 14 +++++ .../matching-brackets/matching-brackets.js | 8 +++ exercises/matrix/matrix.js | 18 +++++++ exercises/nth-prime/nth-prime.js | 10 ++++ .../nucleotide-count/nucleotide-count.js | 10 ++++ exercises/ocr-numbers/ocr-numbers.js | 8 +++ exercises/octal/octal.js | 14 +++++ .../palindrome-products.js | 10 ++++ exercises/pangram/pangram.js | 8 +++ .../pascals-triangle/pascals-triangle.js | 18 +++++++ exercises/perfect-numbers/perfect-numbers.js | 8 +++ exercises/phone-number/phone-number.js | 14 +++++ exercises/pig-latin/pig-latin.js | 10 ++++ exercises/point-mutations/point-mutations.js | 14 +++++ exercises/prime-factors/prime-factors.js | 8 +++ .../protein-translation.js | 8 +++ exercises/proverb/proverb.js | 8 +++ .../pythagorean-triplet.js | 26 ++++++++++ exercises/raindrops/raindrops.js | 8 +++ .../rational-numbers/rational-numbers.js | 42 +++++++++++++++ exercises/rectangles/rectangles.js | 10 ++++ .../resistor-color-duo/resistor-color-duo.js | 8 +++ exercises/resistor-color/resistor-color.js | 11 ++++ exercises/reverse-string/reverse-string.js | 8 +++ .../rna-transcription/rna-transcription.js | 8 +++ exercises/robot-simulator/robot-simulator.js | 52 +++++++++++++++++++ exercises/roman-numerals/roman-numerals.js | 8 +++ .../rotational-cipher/rotational-cipher.js | 10 ++++ .../run-length-encoding.js | 12 +++++ exercises/saddle-points/saddle-points.js | 22 ++++++++ exercises/say/say.js | 10 ++++ exercises/scrabble-score/scrabble-score.js | 8 +++ .../secret-handshake/secret-handshake.js | 8 +++ exercises/series/series.js | 18 +++++++ exercises/sieve/sieve.js | 8 +++ exercises/simple-cipher/simple-cipher.js | 22 ++++++++ exercises/space-age/space-age.js | 8 +++ exercises/spiral-matrix/spiral-matrix.js | 10 ++++ exercises/strain/strain.js | 12 +++++ exercises/sublist/sublist.js | 14 +++++ .../sum-of-multiples/sum-of-multiples.js | 8 +++ exercises/transpose/transpose.js | 8 +++ exercises/triangle/triangle.js | 14 +++++ exercises/trinary/trinary.js | 14 +++++ exercises/twelve-days/twelve-days.js | 8 +++ exercises/two-bucket/two-bucket.js | 22 ++++++++ .../variable-length-quantity.js | 12 +++++ exercises/word-count/word-count.js | 10 ++++ 82 files changed, 1204 insertions(+) create mode 100644 exercises/accumulate/accumulate.js create mode 100644 exercises/acronym/acronym.js create mode 100644 exercises/all-your-base/all-your-base.js create mode 100644 exercises/allergies/allergies.js create mode 100644 exercises/anagram/anagram.js create mode 100644 exercises/armstrong-numbers/armstrong-numbers.js create mode 100644 exercises/beer-song/beer-song.js create mode 100644 exercises/binary-search-tree/binary-search-tree.js create mode 100644 exercises/binary/binary.js create mode 100644 exercises/clock/clock.js create mode 100644 exercises/collatz-conjecture/collatz-conjecture.js create mode 100644 exercises/complex-numbers/complex-numbers.js create mode 100644 exercises/custom-set/custom-set.js create mode 100644 exercises/darts/darts.js create mode 100644 exercises/diamond/diamond.js create mode 100644 exercises/difference-of-squares/difference-of-squares.js create mode 100644 exercises/diffie-hellman/diffie-helman.js create mode 100644 exercises/dnd-character/dnd-character.js create mode 100644 exercises/etl/etl.js create mode 100644 exercises/flatten-array/flatten-array.js create mode 100644 exercises/food-chain/food-chain.js create mode 100644 exercises/gigasecond/gigasecond.js create mode 100644 exercises/grade-school/grade-school.js create mode 100644 exercises/grains/grains.js create mode 100644 exercises/hamming/hamming.js create mode 100644 exercises/hexadecimal/hexadecimal.js create mode 100644 exercises/high-scores/high-scores.js create mode 100644 exercises/house/house.js create mode 100644 exercises/isbn-verifier/isbn-verifier.js create mode 100644 exercises/isogram/isogram.js create mode 100644 exercises/largest-series-product/largest-series-product.js create mode 100644 exercises/leap/leap.js create mode 100644 exercises/linked-list/linked-list.js create mode 100644 exercises/list-ops/list-ops.js create mode 100644 exercises/luhn/luhn.js create mode 100644 exercises/matching-brackets/matching-brackets.js create mode 100644 exercises/matrix/matrix.js create mode 100644 exercises/nth-prime/nth-prime.js create mode 100644 exercises/nucleotide-count/nucleotide-count.js create mode 100644 exercises/ocr-numbers/ocr-numbers.js create mode 100644 exercises/octal/octal.js create mode 100644 exercises/palindrome-products/palindrome-products.js create mode 100644 exercises/pangram/pangram.js create mode 100644 exercises/pascals-triangle/pascals-triangle.js create mode 100644 exercises/perfect-numbers/perfect-numbers.js create mode 100644 exercises/phone-number/phone-number.js create mode 100644 exercises/pig-latin/pig-latin.js create mode 100644 exercises/point-mutations/point-mutations.js create mode 100644 exercises/prime-factors/prime-factors.js create mode 100644 exercises/protein-translation/protein-translation.js create mode 100644 exercises/proverb/proverb.js create mode 100644 exercises/pythagorean-triplet/pythagorean-triplet.js create mode 100644 exercises/raindrops/raindrops.js create mode 100644 exercises/rational-numbers/rational-numbers.js create mode 100644 exercises/rectangles/rectangles.js create mode 100644 exercises/resistor-color-duo/resistor-color-duo.js create mode 100644 exercises/resistor-color/resistor-color.js create mode 100644 exercises/reverse-string/reverse-string.js create mode 100644 exercises/rna-transcription/rna-transcription.js create mode 100644 exercises/robot-simulator/robot-simulator.js create mode 100644 exercises/roman-numerals/roman-numerals.js create mode 100644 exercises/rotational-cipher/rotational-cipher.js create mode 100644 exercises/run-length-encoding/run-length-encoding.js create mode 100644 exercises/saddle-points/saddle-points.js create mode 100644 exercises/say/say.js create mode 100644 exercises/scrabble-score/scrabble-score.js create mode 100644 exercises/secret-handshake/secret-handshake.js create mode 100644 exercises/series/series.js create mode 100644 exercises/sieve/sieve.js create mode 100644 exercises/simple-cipher/simple-cipher.js create mode 100644 exercises/space-age/space-age.js create mode 100644 exercises/spiral-matrix/spiral-matrix.js create mode 100644 exercises/strain/strain.js create mode 100644 exercises/sublist/sublist.js create mode 100644 exercises/sum-of-multiples/sum-of-multiples.js create mode 100644 exercises/transpose/transpose.js create mode 100644 exercises/triangle/triangle.js create mode 100644 exercises/trinary/trinary.js create mode 100644 exercises/twelve-days/twelve-days.js create mode 100644 exercises/two-bucket/two-bucket.js create mode 100644 exercises/variable-length-quantity/variable-length-quantity.js create mode 100644 exercises/word-count/word-count.js diff --git a/exercises/accumulate/accumulate.js b/exercises/accumulate/accumulate.js new file mode 100644 index 0000000000..9d8bea7420 --- /dev/null +++ b/exercises/accumulate/accumulate.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Accumulate' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const accumulate = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/acronym/acronym.js b/exercises/acronym/acronym.js new file mode 100644 index 0000000000..0a4959db52 --- /dev/null +++ b/exercises/acronym/acronym.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Acronym' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const parse = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/all-your-base/all-your-base.js b/exercises/all-your-base/all-your-base.js new file mode 100644 index 0000000000..b15659e745 --- /dev/null +++ b/exercises/all-your-base/all-your-base.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'All Your Base' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const convert = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/allergies/allergies.js b/exercises/allergies/allergies.js new file mode 100644 index 0000000000..6eaf09034e --- /dev/null +++ b/exercises/allergies/allergies.js @@ -0,0 +1,18 @@ +// +// This is only a SKELETON file for the 'Allergies' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Allergies { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + list() { + throw new Error("Remove this statement and implement this function"); + } + + allergicTo() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/anagram/anagram.js b/exercises/anagram/anagram.js new file mode 100644 index 0000000000..ff69da451c --- /dev/null +++ b/exercises/anagram/anagram.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'Anagram' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Anagram { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + matches() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/armstrong-numbers/armstrong-numbers.js b/exercises/armstrong-numbers/armstrong-numbers.js new file mode 100644 index 0000000000..7a36d5a696 --- /dev/null +++ b/exercises/armstrong-numbers/armstrong-numbers.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Armstrong numbers' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const validate = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/beer-song/beer-song.js b/exercises/beer-song/beer-song.js new file mode 100644 index 0000000000..c1a3b7f44e --- /dev/null +++ b/exercises/beer-song/beer-song.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'Beer Song' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class BeerSong { + static verse() { + throw new Error("Remove this statement and implement this function"); + } + + static sing() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/binary-search-tree/binary-search-tree.js b/exercises/binary-search-tree/binary-search-tree.js new file mode 100644 index 0000000000..59fc1697ab --- /dev/null +++ b/exercises/binary-search-tree/binary-search-tree.js @@ -0,0 +1,25 @@ +// +// This is only a SKELETON file for the 'Binary Search Tree' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class BinarySearchTree { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + get data() { + throw new Error("Remove this statement and implement this function"); + } + get right() { + throw new Error("Remove this statement and implement this function"); + } + + get left() { + throw new Error("Remove this statement and implement this function"); + } + + insert() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/binary/binary.js b/exercises/binary/binary.js new file mode 100644 index 0000000000..74d0aeafb9 --- /dev/null +++ b/exercises/binary/binary.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'Binary' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Binary { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + toDecimal() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/clock/clock.js b/exercises/clock/clock.js new file mode 100644 index 0000000000..76b1a7b8a1 --- /dev/null +++ b/exercises/clock/clock.js @@ -0,0 +1,22 @@ +// +// This is only a SKELETON file for the 'Clock' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class at { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + plus() { + throw new Error("Remove this statement and implement this function"); + } + + minus() { + throw new Error("Remove this statement and implement this function"); + } + + equals() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/collatz-conjecture/collatz-conjecture.js b/exercises/collatz-conjecture/collatz-conjecture.js new file mode 100644 index 0000000000..f316e19667 --- /dev/null +++ b/exercises/collatz-conjecture/collatz-conjecture.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Collatz Conjecture' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const steps = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/complex-numbers/complex-numbers.js b/exercises/complex-numbers/complex-numbers.js new file mode 100644 index 0000000000..12fc91fd58 --- /dev/null +++ b/exercises/complex-numbers/complex-numbers.js @@ -0,0 +1,46 @@ +// +// This is only a SKELETON file for the 'Complex Numbers' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class ComplexNumber { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + get real() { + throw new Error("Remove this statement and implement this function"); + } + + get imag() { + throw new Error("Remove this statement and implement this function"); + } + + add() { + throw new Error("Remove this statement and implement this function"); + } + + sub() { + throw new Error("Remove this statement and implement this function"); + } + + div() { + throw new Error("Remove this statement and implement this function"); + } + + mul() { + throw new Error("Remove this statement and implement this function"); + } + + abs() { + throw new Error("Remove this statement and implement this function"); + } + + conj() { + throw new Error("Remove this statement and implement this function"); + } + + exp() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/custom-set/custom-set.js b/exercises/custom-set/custom-set.js new file mode 100644 index 0000000000..bac9903d71 --- /dev/null +++ b/exercises/custom-set/custom-set.js @@ -0,0 +1,46 @@ +// +// This is only a SKELETON file for the 'Custom Set' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class CustomSet { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + empty() { + throw new Error("Remove this statement and implement this function"); + } + + contains() { + throw new Error("Remove this statement and implement this function"); + } + + add() { + throw new Error("Remove this statement and implement this function"); + } + + subset() { + throw new Error("Remove this statement and implement this function"); + } + + disjoint() { + throw new Error("Remove this statement and implement this function"); + } + + eql() { + throw new Error("Remove this statement and implement this function"); + } + + union() { + throw new Error("Remove this statement and implement this function"); + } + + intersection() { + throw new Error("Remove this statement and implement this function"); + } + + difference() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/darts/darts.js b/exercises/darts/darts.js new file mode 100644 index 0000000000..f5f681e796 --- /dev/null +++ b/exercises/darts/darts.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Darts' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const solve = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/diamond/diamond.js b/exercises/diamond/diamond.js new file mode 100644 index 0000000000..b5f4930a64 --- /dev/null +++ b/exercises/diamond/diamond.js @@ -0,0 +1,10 @@ +// +// This is only a SKELETON file for the 'Diamond' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Diamond { + makeDiamond() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/difference-of-squares/difference-of-squares.js b/exercises/difference-of-squares/difference-of-squares.js new file mode 100644 index 0000000000..8394943cd3 --- /dev/null +++ b/exercises/difference-of-squares/difference-of-squares.js @@ -0,0 +1,22 @@ +// +// This is only a SKELETON file for the 'Difference of Squares' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Squares { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + get sumOfSquares() { + throw new Error("Remove this statement and implement this function"); + } + + get squareOfSum() { + throw new Error("Remove this statement and implement this function"); + } + + get difference() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/diffie-hellman/diffie-helman.js b/exercises/diffie-hellman/diffie-helman.js new file mode 100644 index 0000000000..f3918f54df --- /dev/null +++ b/exercises/diffie-hellman/diffie-helman.js @@ -0,0 +1,18 @@ +// +// This is only a SKELETON file for the 'Diffie Hellman' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class DiffieHellman { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + getPublicKeyFromPrivateKey() { + throw new Error("Remove this statement and implement this function"); + } + + getSharedSecret() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/dnd-character/dnd-character.js b/exercises/dnd-character/dnd-character.js new file mode 100644 index 0000000000..7143ebdc6e --- /dev/null +++ b/exercises/dnd-character/dnd-character.js @@ -0,0 +1,42 @@ +// +// This is only a SKELETON file for the 'DnD Character' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const abilityModifier = () => { + throw new Error("Remove this statement and implement this function"); +}; + +export class Character { + static rollAbility() { + throw new Error("Remove this statement and implement this function"); + } + + get strength() { + throw new Error("Remove this statement and implement this function"); + } + + get dexterity() { + throw new Error("Remove this statement and implement this function"); + } + + get constitution() { + throw new Error("Remove this statement and implement this function"); + } + + get intelligence() { + throw new Error("Remove this statement and implement this function"); + } + + get wisdom() { + throw new Error("Remove this statement and implement this function"); + } + + get charisma() { + throw new Error("Remove this statement and implement this function"); + } + + get hitpoints() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/etl/etl.js b/exercises/etl/etl.js new file mode 100644 index 0000000000..0b232af7bc --- /dev/null +++ b/exercises/etl/etl.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'etl' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const transform = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/flatten-array/flatten-array.js b/exercises/flatten-array/flatten-array.js new file mode 100644 index 0000000000..e6a77e1407 --- /dev/null +++ b/exercises/flatten-array/flatten-array.js @@ -0,0 +1,10 @@ +// +// This is only a SKELETON file for the 'Flatten Array' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Flattener { + flatten() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/food-chain/food-chain.js b/exercises/food-chain/food-chain.js new file mode 100644 index 0000000000..4e111227a4 --- /dev/null +++ b/exercises/food-chain/food-chain.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'Food Chain' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Song { + verse() { + throw new Error("Remove this statement and implement this function"); + } + + verses() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/gigasecond/gigasecond.js b/exercises/gigasecond/gigasecond.js new file mode 100644 index 0000000000..9a3ca6335f --- /dev/null +++ b/exercises/gigasecond/gigasecond.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Gigasecond' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const gigasecond = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/grade-school/grade-school.js b/exercises/grade-school/grade-school.js new file mode 100644 index 0000000000..537b49e2d8 --- /dev/null +++ b/exercises/grade-school/grade-school.js @@ -0,0 +1,18 @@ +// +// This is only a SKELETON file for the 'Grade School' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class GradeSchool { + roster() { + throw new Error("Remove this statement and implement this function"); + } + + add() { + throw new Error("Remove this statement and implement this function"); + } + + grade() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/grains/grains.js b/exercises/grains/grains.js new file mode 100644 index 0000000000..91507f816c --- /dev/null +++ b/exercises/grains/grains.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'Grains' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Grains { + square() { + throw new Error("Remove this statement and implement this function"); + } + + total() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/hamming/hamming.js b/exercises/hamming/hamming.js new file mode 100644 index 0000000000..154173dea8 --- /dev/null +++ b/exercises/hamming/hamming.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Hamming' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const compute = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/hexadecimal/hexadecimal.js b/exercises/hexadecimal/hexadecimal.js new file mode 100644 index 0000000000..d35522e7bf --- /dev/null +++ b/exercises/hexadecimal/hexadecimal.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Hexadecimal' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const toDecimal = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/high-scores/high-scores.js b/exercises/high-scores/high-scores.js new file mode 100644 index 0000000000..d6bc22560f --- /dev/null +++ b/exercises/high-scores/high-scores.js @@ -0,0 +1,26 @@ +// +// This is only a SKELETON file for the 'High-Scores' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class HighScores { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + get scores() { + throw new Error("Remove this statement and implement this function"); + } + + get latest() { + throw new Error("Remove this statement and implement this function"); + } + + get personalBest() { + throw new Error("Remove this statement and implement this function"); + } + + get personalTopThree() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/house/house.js b/exercises/house/house.js new file mode 100644 index 0000000000..1e80439432 --- /dev/null +++ b/exercises/house/house.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'House' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class House { + static verse() { + throw new Error("Remove this statement and implement this function"); + } + + static verses() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/isbn-verifier/isbn-verifier.js b/exercises/isbn-verifier/isbn-verifier.js new file mode 100644 index 0000000000..9853c54424 --- /dev/null +++ b/exercises/isbn-verifier/isbn-verifier.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'ISBN Verifier' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class ISBN { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + isValid() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/isogram/isogram.js b/exercises/isogram/isogram.js new file mode 100644 index 0000000000..728e9d90ed --- /dev/null +++ b/exercises/isogram/isogram.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Isogram' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const isIsogram = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/largest-series-product/largest-series-product.js b/exercises/largest-series-product/largest-series-product.js new file mode 100644 index 0000000000..f8469465e8 --- /dev/null +++ b/exercises/largest-series-product/largest-series-product.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Largest Series Product' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const largestProduct = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/leap/leap.js b/exercises/leap/leap.js new file mode 100644 index 0000000000..042b2fca79 --- /dev/null +++ b/exercises/leap/leap.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Leap' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const isLeap = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/linked-list/linked-list.js b/exercises/linked-list/linked-list.js new file mode 100644 index 0000000000..2f96567076 --- /dev/null +++ b/exercises/linked-list/linked-list.js @@ -0,0 +1,30 @@ +// +// This is only a SKELETON file for the 'Linked List' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class LinkedList { + push() { + throw new Error("Remove this statement and implement this function"); + } + + pop() { + throw new Error("Remove this statement and implement this function"); + } + + shift() { + throw new Error("Remove this statement and implement this function"); + } + + unshift() { + throw new Error("Remove this statement and implement this function"); + } + + delete() { + throw new Error("Remove this statement and implement this function"); + } + + count() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/list-ops/list-ops.js b/exercises/list-ops/list-ops.js new file mode 100644 index 0000000000..9cdd5c1f1d --- /dev/null +++ b/exercises/list-ops/list-ops.js @@ -0,0 +1,42 @@ +// +// This is only a SKELETON file for the 'List - Ops' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class List { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + append() { + throw new Error("Remove this statement and implement this function"); + } + + concat() { + throw new Error("Remove this statement and implement this function"); + } + + filter() { + throw new Error("Remove this statement and implement this function"); + } + + map() { + throw new Error("Remove this statement and implement this function"); + } + + length() { + throw new Error("Remove this statement and implement this function"); + } + + foldl() { + throw new Error("Remove this statement and implement this function"); + } + + foldr() { + throw new Error("Remove this statement and implement this function"); + } + + reverse() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/luhn/luhn.js b/exercises/luhn/luhn.js new file mode 100644 index 0000000000..1a68a1bcc0 --- /dev/null +++ b/exercises/luhn/luhn.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'Luhn' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Luhn { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + get valid() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/matching-brackets/matching-brackets.js b/exercises/matching-brackets/matching-brackets.js new file mode 100644 index 0000000000..cee814bc18 --- /dev/null +++ b/exercises/matching-brackets/matching-brackets.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Matching Brackets' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const matchingBrackets = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/matrix/matrix.js b/exercises/matrix/matrix.js new file mode 100644 index 0000000000..bc1a13564a --- /dev/null +++ b/exercises/matrix/matrix.js @@ -0,0 +1,18 @@ +// +// This is only a SKELETON file for the 'Matrix' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Matrix { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + get rows() { + throw new Error("Remove this statement and implement this function"); + } + + get columns() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/nth-prime/nth-prime.js b/exercises/nth-prime/nth-prime.js new file mode 100644 index 0000000000..e2738e439b --- /dev/null +++ b/exercises/nth-prime/nth-prime.js @@ -0,0 +1,10 @@ +// +// This is only a SKELETON file for the 'nth Prime' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Prime { + nth() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/nucleotide-count/nucleotide-count.js b/exercises/nucleotide-count/nucleotide-count.js new file mode 100644 index 0000000000..fe6e262453 --- /dev/null +++ b/exercises/nucleotide-count/nucleotide-count.js @@ -0,0 +1,10 @@ +// +// This is only a SKELETON file for the 'Nucleotide-Count' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class NucleotideCounts { + static parse() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/ocr-numbers/ocr-numbers.js b/exercises/ocr-numbers/ocr-numbers.js new file mode 100644 index 0000000000..3c598bdde5 --- /dev/null +++ b/exercises/ocr-numbers/ocr-numbers.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'OCR Numbers' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const convert = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/octal/octal.js b/exercises/octal/octal.js new file mode 100644 index 0000000000..7ce1480f1a --- /dev/null +++ b/exercises/octal/octal.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'Octal' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Octal { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + toDecimal() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/palindrome-products/palindrome-products.js b/exercises/palindrome-products/palindrome-products.js new file mode 100644 index 0000000000..87966fcd52 --- /dev/null +++ b/exercises/palindrome-products/palindrome-products.js @@ -0,0 +1,10 @@ +// +// This is only a SKELETON file for the 'Palindrome Products' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Palindromes { + static generate() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/pangram/pangram.js b/exercises/pangram/pangram.js new file mode 100644 index 0000000000..9c6dac167d --- /dev/null +++ b/exercises/pangram/pangram.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Pangram' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const isPangram = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/pascals-triangle/pascals-triangle.js b/exercises/pascals-triangle/pascals-triangle.js new file mode 100644 index 0000000000..004b3c5068 --- /dev/null +++ b/exercises/pascals-triangle/pascals-triangle.js @@ -0,0 +1,18 @@ +// +// This is only a SKELETON file for the 'Pascals Triangle' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Triangle { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + get lastRow() { + throw new Error("Remove this statement and implement this function"); + } + + get rows() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/perfect-numbers/perfect-numbers.js b/exercises/perfect-numbers/perfect-numbers.js new file mode 100644 index 0000000000..488e243559 --- /dev/null +++ b/exercises/perfect-numbers/perfect-numbers.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Perfect Numbers' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const classify = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/phone-number/phone-number.js b/exercises/phone-number/phone-number.js new file mode 100644 index 0000000000..23a7acffaf --- /dev/null +++ b/exercises/phone-number/phone-number.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'Phone Number' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class PhoneNumber { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + number() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/pig-latin/pig-latin.js b/exercises/pig-latin/pig-latin.js new file mode 100644 index 0000000000..95d0e5ef4b --- /dev/null +++ b/exercises/pig-latin/pig-latin.js @@ -0,0 +1,10 @@ +// +// This is only a SKELETON file for the 'Pig Latin' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class translator { + static translate() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/point-mutations/point-mutations.js b/exercises/point-mutations/point-mutations.js new file mode 100644 index 0000000000..254ab9a3b9 --- /dev/null +++ b/exercises/point-mutations/point-mutations.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'Point Mutations' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class DNA { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + hammingDistance() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/prime-factors/prime-factors.js b/exercises/prime-factors/prime-factors.js new file mode 100644 index 0000000000..b8f2e857a2 --- /dev/null +++ b/exercises/prime-factors/prime-factors.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Prime Factors' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const primeFactors = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/protein-translation/protein-translation.js b/exercises/protein-translation/protein-translation.js new file mode 100644 index 0000000000..047c11cf0c --- /dev/null +++ b/exercises/protein-translation/protein-translation.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Protein Translation' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const translate = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/proverb/proverb.js b/exercises/proverb/proverb.js new file mode 100644 index 0000000000..9edafb6a7c --- /dev/null +++ b/exercises/proverb/proverb.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Proverb' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const proverb = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/pythagorean-triplet/pythagorean-triplet.js b/exercises/pythagorean-triplet/pythagorean-triplet.js new file mode 100644 index 0000000000..d930e4fb8b --- /dev/null +++ b/exercises/pythagorean-triplet/pythagorean-triplet.js @@ -0,0 +1,26 @@ +// +// This is only a SKELETON file for the 'Pythagorean Triplet' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Triplet { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + sum() { + throw new Error("Remove this statement and implement this function"); + } + + product() { + throw new Error("Remove this statement and implement this function"); + } + + isPythagorean() { + throw new Error("Remove this statement and implement this function"); + } + + static where() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/raindrops/raindrops.js b/exercises/raindrops/raindrops.js new file mode 100644 index 0000000000..4cd1f6e95d --- /dev/null +++ b/exercises/raindrops/raindrops.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Raindrops' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const convert = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/rational-numbers/rational-numbers.js b/exercises/rational-numbers/rational-numbers.js new file mode 100644 index 0000000000..07ac5ff3e2 --- /dev/null +++ b/exercises/rational-numbers/rational-numbers.js @@ -0,0 +1,42 @@ +// +// This is only a SKELETON file for the 'Rational Numbers' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Rational { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + add() { + throw new Error("Remove this statement and implement this function"); + } + + sub() { + throw new Error("Remove this statement and implement this function"); + } + + mul() { + throw new Error("Remove this statement and implement this function"); + } + + div() { + throw new Error("Remove this statement and implement this function"); + } + + abs() { + throw new Error("Remove this statement and implement this function"); + } + + exprational() { + throw new Error("Remove this statement and implement this function"); + } + + expreal() { + throw new Error("Remove this statement and implement this function"); + } + + reduce() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/rectangles/rectangles.js b/exercises/rectangles/rectangles.js new file mode 100644 index 0000000000..efeb1ab988 --- /dev/null +++ b/exercises/rectangles/rectangles.js @@ -0,0 +1,10 @@ +// +// This is only a SKELETON file for the 'Rectangles' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Rectangles { + static count() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/resistor-color-duo/resistor-color-duo.js b/exercises/resistor-color-duo/resistor-color-duo.js new file mode 100644 index 0000000000..73a19ce03e --- /dev/null +++ b/exercises/resistor-color-duo/resistor-color-duo.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Resistor Color Duo' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const value = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/resistor-color/resistor-color.js b/exercises/resistor-color/resistor-color.js new file mode 100644 index 0000000000..4bd0604bf9 --- /dev/null +++ b/exercises/resistor-color/resistor-color.js @@ -0,0 +1,11 @@ +// +// This is only a SKELETON file for the 'Resistor Color' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const colorCode = () => { + throw new Error("Remove this statement and implement this function"); +}; + +// Fill the array with the various colors +export const COLORS = []; diff --git a/exercises/reverse-string/reverse-string.js b/exercises/reverse-string/reverse-string.js new file mode 100644 index 0000000000..0d4bbed25d --- /dev/null +++ b/exercises/reverse-string/reverse-string.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Reverse String' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const reverseString = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/rna-transcription/rna-transcription.js b/exercises/rna-transcription/rna-transcription.js new file mode 100644 index 0000000000..9cf4cf49be --- /dev/null +++ b/exercises/rna-transcription/rna-transcription.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'RNA Transcription' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const toRna = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/robot-simulator/robot-simulator.js b/exercises/robot-simulator/robot-simulator.js new file mode 100644 index 0000000000..7dfcbfa743 --- /dev/null +++ b/exercises/robot-simulator/robot-simulator.js @@ -0,0 +1,52 @@ +// +// This is only a SKELETON file for the 'Robot Simulator' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class InvalidInputError extends Error { + constructor() { + throw new Error("Remove this statement and implement this function"); + } +} + +export class Robot { + orient() { + throw new Error("Remove this statement and implement this function"); + } + + get bearing() { + throw new Error("Remove this statement and implement this function"); + } + + get coordinates() { + throw new Error("Remove this statement and implement this function"); + } + + turnRight() { + throw new Error("Remove this statement and implement this function"); + } + + turnLeft() { + throw new Error("Remove this statement and implement this function"); + } + + at() { + throw new Error("Remove this statement and implement this function"); + } + + advance() { + throw new Error("Remove this statement and implement this function"); + } + + instructions() { + throw new Error("Remove this statement and implement this function"); + } + + place() { + throw new Error("Remove this statement and implement this function"); + } + + evaluate() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/roman-numerals/roman-numerals.js b/exercises/roman-numerals/roman-numerals.js new file mode 100644 index 0000000000..2de50aeff5 --- /dev/null +++ b/exercises/roman-numerals/roman-numerals.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Roman Numerals' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const toRoman = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/rotational-cipher/rotational-cipher.js b/exercises/rotational-cipher/rotational-cipher.js new file mode 100644 index 0000000000..7990941506 --- /dev/null +++ b/exercises/rotational-cipher/rotational-cipher.js @@ -0,0 +1,10 @@ +// +// This is only a SKELETON file for the 'Rotational Cipher' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class RotationalCipher { + static rotate() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/run-length-encoding/run-length-encoding.js b/exercises/run-length-encoding/run-length-encoding.js new file mode 100644 index 0000000000..74db28f0e0 --- /dev/null +++ b/exercises/run-length-encoding/run-length-encoding.js @@ -0,0 +1,12 @@ +// +// This is only a SKELETON file for the 'Run Length Encoding' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const encode = () => { + throw new Error("Remove this statement and implement this function"); +}; + +export const decode = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/saddle-points/saddle-points.js b/exercises/saddle-points/saddle-points.js new file mode 100644 index 0000000000..182895f2d1 --- /dev/null +++ b/exercises/saddle-points/saddle-points.js @@ -0,0 +1,22 @@ +// +// This is only a SKELETON file for the 'Saddle Points' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Matrix { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + get rows() { + throw new Error("Remove this statement and implement this function"); + } + + get columns() { + throw new Error("Remove this statement and implement this function"); + } + + get saddlePoints() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/say/say.js b/exercises/say/say.js new file mode 100644 index 0000000000..35e33cb3e1 --- /dev/null +++ b/exercises/say/say.js @@ -0,0 +1,10 @@ +// +// This is only a SKELETON file for the 'Say' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Say { + inEnglish() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/scrabble-score/scrabble-score.js b/exercises/scrabble-score/scrabble-score.js new file mode 100644 index 0000000000..fce6a59b77 --- /dev/null +++ b/exercises/scrabble-score/scrabble-score.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Scrabble Score' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const score = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/secret-handshake/secret-handshake.js b/exercises/secret-handshake/secret-handshake.js new file mode 100644 index 0000000000..10ec68a233 --- /dev/null +++ b/exercises/secret-handshake/secret-handshake.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Secret Handshake' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const secretHandshake = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/series/series.js b/exercises/series/series.js new file mode 100644 index 0000000000..e0ea3a6f08 --- /dev/null +++ b/exercises/series/series.js @@ -0,0 +1,18 @@ +// +// This is only a SKELETON file for the 'Series' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Series { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + get digits() { + throw new Error("Remove this statement and implement this function"); + } + + slices() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/sieve/sieve.js b/exercises/sieve/sieve.js new file mode 100644 index 0000000000..cf53a8121f --- /dev/null +++ b/exercises/sieve/sieve.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Sieve' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const primes = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/simple-cipher/simple-cipher.js b/exercises/simple-cipher/simple-cipher.js new file mode 100644 index 0000000000..ae3c22b916 --- /dev/null +++ b/exercises/simple-cipher/simple-cipher.js @@ -0,0 +1,22 @@ +// +// This is only a SKELETON file for the 'Simple Cipher' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class List { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + encode() { + throw new Error("Remove this statement and implement this function"); + } + + decode() { + throw new Error("Remove this statement and implement this function"); + } + + get key() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/space-age/space-age.js b/exercises/space-age/space-age.js new file mode 100644 index 0000000000..e879c2cc26 --- /dev/null +++ b/exercises/space-age/space-age.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Space Age' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const age = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/spiral-matrix/spiral-matrix.js b/exercises/spiral-matrix/spiral-matrix.js new file mode 100644 index 0000000000..b107d1c43e --- /dev/null +++ b/exercises/spiral-matrix/spiral-matrix.js @@ -0,0 +1,10 @@ +// +// This is only a SKELETON file for the 'Spiral Matrix' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class SpiralMatrix { + static ofSize() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/strain/strain.js b/exercises/strain/strain.js new file mode 100644 index 0000000000..7a807be980 --- /dev/null +++ b/exercises/strain/strain.js @@ -0,0 +1,12 @@ +// +// This is only a SKELETON file for the 'Strain' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const keep = () => { + throw new Error("Remove this statement and implement this function"); +}; + +export const discard = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/sublist/sublist.js b/exercises/sublist/sublist.js new file mode 100644 index 0000000000..2565082c1c --- /dev/null +++ b/exercises/sublist/sublist.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'Sublist' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class List { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + compare() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/sum-of-multiples/sum-of-multiples.js b/exercises/sum-of-multiples/sum-of-multiples.js new file mode 100644 index 0000000000..418c812a20 --- /dev/null +++ b/exercises/sum-of-multiples/sum-of-multiples.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Sum of Multiples' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const sumOfMultiples = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/transpose/transpose.js b/exercises/transpose/transpose.js new file mode 100644 index 0000000000..bfe11109a8 --- /dev/null +++ b/exercises/transpose/transpose.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Transpose' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const transpose = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/triangle/triangle.js b/exercises/triangle/triangle.js new file mode 100644 index 0000000000..5916a7ca76 --- /dev/null +++ b/exercises/triangle/triangle.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'Triangle' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Triangle { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + kind() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/trinary/trinary.js b/exercises/trinary/trinary.js new file mode 100644 index 0000000000..8c4673f2e6 --- /dev/null +++ b/exercises/trinary/trinary.js @@ -0,0 +1,14 @@ +// +// This is only a SKELETON file for the 'Trinary' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Trinary { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + toDecimal() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/twelve-days/twelve-days.js b/exercises/twelve-days/twelve-days.js new file mode 100644 index 0000000000..e663ae6c5d --- /dev/null +++ b/exercises/twelve-days/twelve-days.js @@ -0,0 +1,8 @@ +// +// This is only a SKELETON file for the 'Twelve Days' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const recite = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/two-bucket/two-bucket.js b/exercises/two-bucket/two-bucket.js new file mode 100644 index 0000000000..186ab6252f --- /dev/null +++ b/exercises/two-bucket/two-bucket.js @@ -0,0 +1,22 @@ +// +// This is only a SKELETON file for the 'Two Bucket' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class TwoBucket { + constructor() { + throw new Error("Remove this statement and implement this function"); + } + + moves() { + throw new Error("Remove this statement and implement this function"); + } + + get goalBucket() { + throw new Error("Remove this statement and implement this function"); + } + + get otherBucket() { + throw new Error("Remove this statement and implement this function"); + } +} diff --git a/exercises/variable-length-quantity/variable-length-quantity.js b/exercises/variable-length-quantity/variable-length-quantity.js new file mode 100644 index 0000000000..b14e2cb2b7 --- /dev/null +++ b/exercises/variable-length-quantity/variable-length-quantity.js @@ -0,0 +1,12 @@ +// +// This is only a SKELETON file for the 'Variable length Quantity' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export const encode = () => { + throw new Error("Remove this statement and implement this function"); +}; + +export const decode = () => { + throw new Error("Remove this statement and implement this function"); +}; diff --git a/exercises/word-count/word-count.js b/exercises/word-count/word-count.js new file mode 100644 index 0000000000..d1c0af3de0 --- /dev/null +++ b/exercises/word-count/word-count.js @@ -0,0 +1,10 @@ +// +// This is only a SKELETON file for the 'Word Count' exercise. It's been provided as a +// convenience to get you started writing code faster. +// + +export class Words { + count() { + throw new Error("Remove this statement and implement this function"); + } +}