Looking at answer's code

Hi guys.
Finished HTML + CSS, feeling confident about both of them.

Studying JS now , and sometimes I’m stuck on certain curriculums,
my question is, is it okay to watch at the answer’s code if I tried solving it by myself?
Obviously to reverse engineer the code to understand why, not just to complete the assignment.

or should I keep power struggling it through? even tho I am stuck.

Thanks.

Hi @TheOctagon3323 !

I understand wanting to look at the answer because the problem is hard to solve.
We have all been there and we just wanted to move onto the next problem.

But you have to remember that looking at solutions and reverse engineering it is just one type of skill.

You still have to invest in learning how to problem solve and coming up with your solutions.

Taking a look at your last post concerning record collection, I have some tips to help with your problem solving skills.

Record collection trips a lot of people up including myself when I worked on it.
But the issue I realized was that I did not know how to break up a problem and test my code along the way.

This will really help you out when you get to the more advanced section of the javascript curriculum and the projects.

When you get these types of problems, focus on the tackling the first condition and testing that.
Then if you can’t get it to work, come to the forum and ask for help with the first condition.
Then when you figure that out, move onto the second condition.

Test as you go, ask questions and don’t move onto the next condition until you have worked out the current one.

If you take that approach, then the errors won’t pile up on you and you will be able to effectively break down hard problems and solve them.

Hope that helps! :grinning:

ty you for your answer.

It was my initial approach to tackle the conditions individually, but I failed and I wanted to see if I can get the others right before asking a question on the forum.

But I get what you’re saying in the future the best approach might be solving an issue by issue otherwise it will pile up. But since I am a newbie I am not sure if that is the best practice yet , no offense to you ofc!

Asking questions is the best practice when you are stuck. Looking at and copying the answer helps you learn how to duplicate code that others have written. That is unrelated to learning how to write new code that doesn’t have solutions to copy.

This stuff is hard. There is no shame in struggling. Asking questions is good.

2 Likes

Thank you for your words it brings my confidence up :slight_smile:

1 Like

The main reason why I suggest learning how to break down problems now is because I know what is coming up later in the curriculum. :grinning:

As the problems become more challenging, you will want to have practice breaking downing these challenges now to help prepare you later on.

But looking at your latest interactions with @JeremyLT, it looks like you are starting to understand record collection more.

Just try to take it one small step at a time, and you will figure it out :grinning:

2 Likes

The record collection is definitely one of the hardest challenges!

1 Like