Skip to content

Commit 4f8e080

Browse files
docs: make hints less explicit to encourage problem-solving (#576)
1 parent 63b8563 commit 4f8e080

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

06_repeatString/README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ Use loops to implement `repeatString` rather than using the builtin `String.prot
1414

1515
## Hints
1616

17-
- Take note of the above function call- how exactly is it being called?
17+
- What inputs does the function need to achieve its goal?
1818

19-
- Create a variable to hold the string you're going to return, create a loop that repeats the given number of times and add the given string to the result on each loop.
19+
- How can you iteratively build up the final string, using one of the inputs to control the repetition?

09_sumAll/README.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ sumAll(1, 4) // returns the sum of 1 + 2 + 3 + 4 which is 10
99

1010
## Hints
1111

12-
Think about how you would do this on pen and paper and then how you might translate that process into code:
13-
- make sure you pay attention to the function parameters
14-
- create a variable to hold the final sum
15-
- loop through the given numbers ([link](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Loops_and_iteration))
16-
- on each iteration add the number to the sum
17-
- return the sum after finishing the loop
12+
- How will you ensure you're summing all integers within the correct range, no matter the order of the inputs?
13+
14+
- Think about your sum's starting value. Then, how can you make sure every single number from the smaller input to the larger one (including both) gets added to it?

0 commit comments

Comments
 (0)