Skip to content

Commit 304b354

Browse files
committed
Implement multiply function without tests
1 parent 5d7d10a commit 304b354

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/index.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,10 @@ export function sum(numbers: number[]): number {
22
return numbers.reduce((acc, value) => acc + value, 0);
33
}
44

5+
export function multiply(numbers: number[]): number {
6+
return numbers.reduce((acc, value) => acc * value, 1);
7+
}
8+
59
const MONDAY_COUNT = 1;
610
const TUESDAY_COUNT = 2;
711
const WEDNESDAY_COUNT = 3;
@@ -17,3 +21,13 @@ console.info(
1721
FRIDAY_COUNT,
1822
]),
1923
);
24+
25+
console.info(
26+
multiply([
27+
MONDAY_COUNT,
28+
TUESDAY_COUNT,
29+
WEDNESDAY_COUNT,
30+
THURSDAY_COUNT,
31+
FRIDAY_COUNT,
32+
]),
33+
);

0 commit comments

Comments
 (0)