Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions exercises/concept/elyses-analytic-enchantments/enchantments.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
* @returns {number} position of the card in the stack
*/
export function getCardPosition(stack, card) {
throw new Error('Implement the getCardPosition function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -25,7 +25,7 @@ export function getCardPosition(stack, card) {
* @returns {boolean} true if card is in the stack, false otherwise
*/
export function doesStackIncludeCard(stack, card) {
throw new Error('Implement the doesStackIncludeCard function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -36,7 +36,7 @@ export function doesStackIncludeCard(stack, card) {
* @returns {boolean} true if all cards are even, false otherwise
*/
export function isEachCardEven(stack) {
throw new Error('Implement the isEachCardEven function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -47,7 +47,7 @@ export function isEachCardEven(stack) {
* @returns {boolean} true if the array contains odd card, false otherwise
*/
export function doesStackIncludeOddCard(stack) {
throw new Error('Implement the doesStackIncludesOddCard function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -58,7 +58,7 @@ export function doesStackIncludeOddCard(stack) {
* @returns {number | undefined} the first odd value
*/
export function getFirstOddCard(stack) {
throw new Error('Implement the getFirstOddCard function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -69,5 +69,5 @@ export function getFirstOddCard(stack) {
* @returns {number} position of the first card that is even
*/
export function getFirstEvenCardPosition(stack) {
throw new Error('Implement the getFirstEvenCardPosition function');
throw new Error('Remove this line and implement the function');
}
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @returns {Card} the first card in the deck
*/
export function getFirstCard(deck) {
throw new Error('Implement the getFirstCard function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -20,7 +20,7 @@ export function getFirstCard(deck) {
* @returns {Card} the second card in the deck
*/
export function getSecondCard(deck) {
throw new Error('Implement the getSecondCard function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -31,7 +31,7 @@ export function getSecondCard(deck) {
* @returns {[Card, Card]} new deck with the 2 cards swapped
*/
export function swapTwoCards(deck) {
throw new Error('Implement the swapTopTwoCards function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -42,7 +42,7 @@ export function swapTwoCards(deck) {
* @returns {[Card, Card, Card]} new deck with the 3 cards shifted by one position
*/
export function shiftThreeCardsAround(deck) {
throw new Error('Implement the discardTopCard function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -54,7 +54,7 @@ export function shiftThreeCardsAround(deck) {
*/
export function pickNamedPile(piles) {
// 🚨 Do NOT use piles.chosen or piles.disregarded.
throw new Error('Implement the pickNamedPile function');
throw new Error('Remove this line and implement the function');
}

/**
Expand Down
16 changes: 8 additions & 8 deletions exercises/concept/elyses-enchantments/enchantments.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* @returns {number} the card
*/
export function getItem(cards, position) {
throw new Error('Implement the getItem function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -22,7 +22,7 @@ export function getItem(cards, position) {
* @returns {number[]} the cards with the change applied
*/
export function setItem(cards, position, replacementCard) {
throw new Error('Implement the setItem function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -34,7 +34,7 @@ export function setItem(cards, position, replacementCard) {
* @returns {number[]} the cards with the newCard applied
*/
export function insertItemAtTop(cards, newCard) {
throw new Error('Implement the insertItemAtTop function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -46,7 +46,7 @@ export function insertItemAtTop(cards, newCard) {
* @returns {number[]} the cards without the removed card
*/
export function removeItem(cards, position) {
throw new Error('Implement the removeItem function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -57,7 +57,7 @@ export function removeItem(cards, position) {
* @returns {number[]} the cards without the removed card
*/
export function removeItemFromTop(cards) {
throw new Error('Implement the removeItemFromTop function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -69,7 +69,7 @@ export function removeItemFromTop(cards) {
* @returns {number[]} the cards including the new card
*/
export function insertItemAtBottom(cards, newCard) {
throw new Error('Implement the insertItemAtBottom function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -80,7 +80,7 @@ export function insertItemAtBottom(cards, newCard) {
* @returns {number[]} the cards without the removed card
*/
export function removeItemAtBottom(cards) {
throw new Error('Implement the removeItemAtBottom function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -92,5 +92,5 @@ export function removeItemAtBottom(cards) {
* @returns {boolean} true if there are exactly stackSize number of cards, false otherwise
*/
export function checkSizeOfStack(cards, stackSize) {
throw new Error('Implement the checkSizeOfStack function');
throw new Error('Remove this line and implement the function');
}
4 changes: 2 additions & 2 deletions exercises/concept/elyses-looping-enchantments/enchantments.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
*/
export function cardTypeCheck(stack, card) {
// 🚨 Use .forEach
throw new Error('Implement the cardTypeCheck function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -22,5 +22,5 @@ export function cardTypeCheck(stack, card) {
*/
export function determineOddEvenCards(stack, type) {
// 🚨 Use a `for...of` loop
throw new Error('Implement the determineOddEvenCards function');
throw new Error('Remove this line and implement the function');
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
* @returns {number[]} deck with every card doubled
*/
export function seeingDouble(deck) {
throw new Error('Implement the seeingDouble function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -19,7 +19,7 @@ export function seeingDouble(deck) {
* @returns {number[]} deck with triplicate 3s
*/
export function threeOfEachThree(deck) {
throw new Error('Implement the threeOfEachThree function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -31,7 +31,7 @@ export function threeOfEachThree(deck) {
* @returns {number[]} deck with only two middle cards
*/
export function middleTwo(deck) {
throw new Error('Implement the middleTwo function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -43,7 +43,7 @@ export function middleTwo(deck) {
*/

export function sandwichTrick(deck) {
throw new Error('Implement the sandwichTrick function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -54,7 +54,7 @@ export function sandwichTrick(deck) {
* @returns {number[]} deck with only 2s
*/
export function twoIsSpecial(deck) {
throw new Error('Implement the twoIsSpecial function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -65,7 +65,7 @@ export function twoIsSpecial(deck) {
* @returns {number[]} ordered deck
*/
export function perfectlyOrdered(deck) {
throw new Error('Implement the perfectlyOrdered function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -76,5 +76,5 @@ export function perfectlyOrdered(deck) {
* @returns {number[]} reordered deck
*/
export function reorder(deck) {
throw new Error('Implement the reorder function');
throw new Error('Remove this line and implement the function');
}
26 changes: 11 additions & 15 deletions exercises/concept/recycling-robot/assembly-line.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import { ElectronicDevice } from './lib.js';
* @returns {boolean} whether the input is a boolean
*/
export function isBoolean(value) {
throw new Error('Remove this line and implement the isBoolean function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -23,7 +23,7 @@ export function isBoolean(value) {
* @returns {boolean} whether the input is a finite number or bigint
*/
export function isNumber(value) {
throw new Error('Remove this line and implement the isNumber function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -33,7 +33,7 @@ export function isNumber(value) {
* @returns {boolean} whether the input is an object.
*/
export function isObject(value) {
throw new Error('Remove this line and implement the isObject function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -43,9 +43,7 @@ export function isObject(value) {
* @returns {boolean} whether the input is a numeric string.
*/
export function isNumericString(value) {
throw new Error(
'Remove this line and implement the isNumericString function',
);
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -55,7 +53,7 @@ export function isNumericString(value) {
* @returns {boolean} whether the object is an instance of the `ElectronicDevice` class or one of its children.
*/
export function isElectronic(object) {
throw new Error('Remove this line and implement the isElectronic function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -65,9 +63,7 @@ export function isElectronic(object) {
* @returns {boolean} whether the input is a non empty array.
*/
export function isNonEmptyArray(value) {
throw new Error(
'Remove this line and implement the isNonEmptyArray function',
);
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -77,7 +73,7 @@ export function isNonEmptyArray(value) {
* @returns {boolean} whether the input is an empty array.
*/
export function isEmptyArray(value) {
throw new Error('Remove this line and implement the isEmptyArray function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -87,7 +83,7 @@ export function isEmptyArray(value) {
* @returns {boolean} whether the input has a "type" property or method.
*/
export function hasType(object) {
throw new Error('Remove this line and implement the hasType function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -97,7 +93,7 @@ export function hasType(object) {
* @returns {never|void} undefined if the input has an "id" property or method, otherwise throws an error.
*/
export function assertHasId(object) {
throw new Error('Remove this line and implement the assertHasId function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -107,7 +103,7 @@ export function assertHasId(object) {
* @returns {boolean} whether the input has an "id" property.
*/
export function hasIdProperty(object) {
throw new Error('Remove this line and implement the hasIdProperty function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -117,5 +113,5 @@ export function hasIdProperty(object) {
* @returns {boolean} whether the input has a defined "type" property.
*/
export function hasDefinedType(object) {
throw new Error('Remove this line and implement the hasDefinedType function');
throw new Error('Remove this line and implement the function');
}
8 changes: 4 additions & 4 deletions exercises/concept/translation-service/service.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ export class TranslationService {
* @returns {Promise<string>}
*/
free(text) {
throw new Error('Implement the free function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -41,7 +41,7 @@ export class TranslationService {
* @returns {Promise<string[]>}
*/
batch(texts) {
throw new Error('Implement the batch function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -54,7 +54,7 @@ export class TranslationService {
* @returns {Promise<void>}
*/
request(text) {
throw new Error('Implement the request function');
throw new Error('Remove this line and implement the function');
}

/**
Expand All @@ -68,7 +68,7 @@ export class TranslationService {
* @returns {Promise<string>}
*/
premium(text, minimumQuality) {
throw new Error('Implement the premium function');
throw new Error('Remove this line and implement the function');
}
}

Expand Down