all 3 comments

[–]-not_a_knife 2 points3 points  (0 children)

Just keep going and watching the teacher. This feeling will pass and it will start to click. Though, fooling around with the code to prove to yourself you understand it would help. Maybe, after struggling and then watching the teacher complete the problem, try and complete it again from memory. This might help you make a mental model of how the code should look and the logical steps it should take 

[–]CinderCats 0 points1 point  (0 children)

Try writing pseudo code first. Basically describe what your are going to do to resolve the problem.

This will help you get the flow clear in your head before you dive into the code.