-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmixed-juices.js
38 lines (35 loc) · 1.06 KB
/
mixed-juices.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
// @ts-check
//
// The line above enables type checking for this file. Various IDEs interpret
// the @ts-check directive. It will give you helpful autocompletion when
// implementing this exercise.
/**
* Determines how long it takes to prepare a certain juice.
*
* @param {string} name
* @returns {number} time in minutes
*/
export function timeToMixJuice(name) {
throw new Error('Please implement the timeToMixJuice function');
}
/**
* Calculates the number of limes that need to be cut
* to reach a certain supply.
*
* @param {number} wedgesNeeded
* @param {string[]} limes
* @returns {number} number of limes cut
*/
export function limesToCut(wedgesNeeded, limes) {
throw new Error('Please implement the limesToCut function');
}
/**
* Determines which juices still need to be prepared after the end of the shift.
*
* @param {number} timeLeft
* @param {string[]} orders
* @returns {string[]} remaining orders after the time is up
*/
export function remainingOrders(timeLeft, orders) {
throw new Error('Please implement the remainingOrders function');
}