Should I peak at solutions?

Hello,

I’m working through the javascript course and on the intermediate algorithm scripting challenges. So far, I’ve been able to complete the challenges if I spend enough time on them. However, with these, I get so stuck I’m not sure how to continue. After a few hours of spinning my wheels, I end up looking at the solutions.

What do you all think of this? I do my best to research the solution to understand what everything means before moving on. OR Should I ask questions in the forums when I get stuck, move on for now, and go back to the challenges I couldn’t get?

I’m sure there is no ‘right answer’ here, curious about what others have done and feel is the best way to learn.

Thanks!

It is far more helpful to ask questions when you get stuck instead of looking at the answers. Looking at other people’s code is an important skill, but it is a different skill than writing your own code.

As a general rule, I’d advise against looking at solutions before you have come up with a solution yourself. When you talk to people here on the forum you are continuing to engage in the problem solving process. You are thinking critically about what you have done. You are organizing and articulating your thoughts. When people help you on the forum they are giving you ideas and suggestions on how to solve the problem, but you are still working through arriving at the solution.

How to write code can’t be memorized. There isn’t a set of solutions that you can just learn. Once you’ve got the basic syntax down, what really matters is the process of going from a problem to a solution - and you can’t get that by reading a solution.

1 Like

@JeremyLT & @ArielLeslie Thank you for the response. I will adjust my approach!