update README.md
I just went through this problem and ended up debugging by looking at the sumAll.spec.js log on my console because the README.md did not list the exceptions the function should have considered. I believe it would be more beneficial to provide students what they should be considering when implementing the following question.
This commit is contained in:
parent
acca175d24
commit
f8a5478033
|
@ -1,11 +1,16 @@
|
||||||
# Exercise 05 - sumAll
|
# Exercise 05 - sumAll
|
||||||
|
|
||||||
Implement a function that takes 2 integers and returns the sum of every number between(and including) them:
|
Implement a function that takes 2 integers and returns the sum of every number between (and including) them:
|
||||||
|
|
||||||
```javascript
|
```javascript
|
||||||
sumAll(1, 4) // returns the sum of 1 + 2 + 3 + 4 which is 10
|
sumAll(1, 4) // returns the sum of 1 + 2 + 3 + 4 which is 10
|
||||||
```
|
```
|
||||||
|
|
||||||
|
In addition, you should assume the following while implementing your function:
|
||||||
|
|
||||||
|
- parameters are not necessarily passed in numerical order
|
||||||
|
- negative integers are not valid
|
||||||
|
- only integers are valid
|
||||||
|
|
||||||
## Hints
|
## Hints
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue