Skip to content

Commit 300831c

Browse files
authored
12_calculator: Clarify instructions (#579)
1 parent c52633d commit 300831c

File tree

1 file changed

+7
-3
lines changed

1 file changed

+7
-3
lines changed

12_calculator/README.md

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
The goal for this exercise is to create a calculator that does the following:
44

5-
add, subtract, get the sum, multiply, get the power, and find the factorial
5+
1. `add()`: take two numbers and return their sum
6+
2. `subtract()`: take two numbers and return the result after subtracting the second from the first
7+
3. `sum()`: take an array of numbers and add all the numbers together
8+
4. `multiply()`: take an array of numbers and multiply all the numbers together
9+
5. `power()`: take two numbers (base and exponent) and return the result of raising the base to that exponent
10+
6. `factorial()`: given a single number, find its [factorial](https://en.wikipedia.org/wiki/Factorial)
611

7-
In order to do this please fill out each function with your solution. Make sure to return the value so you can test it in Jest! To see the expected value
8-
take a look at the spec file that houses the Jest test cases.
12+
Please fill out each function with your solution. Make sure to `return` the value so you can test it in Jest! To see the expected value, take a look at the `.spec.js` file that houses the Jest test cases.

0 commit comments

Comments
 (0)