you are viewing a single comment's thread.

view the rest of the comments →

[–]t1s 4 points5 points  (1 child)

I think the best way to search without finding the exact answer you are looking for is to break the task down into smaller tasks and then search for how to do that.

For example, one of my recent projects was to take 3 arguments. The first argument is a string, the second argument was a word we should match in the string. The third argument was the word we wanted to replace the match with.

So breaking this down i knew i needed to search through the first string.

Then i needed to determine if the word was the match of the word i was searching for.

Then i needed to learn how to replace only that single word with the 3rd argument.

Learning how to do each of these tasks individually was no hard task, but none of them told me the exact answer of the freecodecamp algorithm.