How to keep track analyze code and few JS question

Hello everyone. So firstly, I already finish Web Responsive part and claim the certificate. And now I do the JS curriculum. It feels great until the recursive part where it getting harder and harder. Oh by the way, english isn’t my native but I’ll do my best to keep you understand with my post.

My question is:

  • How do you exactly keep track the code when you do the analyze?

for example:

for (var i = 0; i <= 10; i++){

Do you open notepad or similiar and make something like:
“Ok, first the i is 0” then you type 0 in notepad
“And then the i will loop” type and analyze again
“And voila!” *your notepad is filled with 1 and 10

Please share how’d you guys analyze it, I keep getting trouble and lost track while I analyzing the loop.

  • Second question, is the basic JS curriculum supposedly this hard after recursive part? Mostly I always do the test on my own, but whenever I got stuck, I try to read the hint, and open the solution for my last resort. But hey don’t worry, I read it again till I understand.

  • After that hard part, I notice that I jumped up from the current curriculum to another curriculum. Is it ok?

I hope you guys understand, sorry again english isn’t my native :frowning:
Looking for forward for reply. See you later and thanks.

Hey @nitrostrike,

How do you exactly keep track the code when you do the analyze?

This is a broad question, that ultimately can be boiled down to your ability to debug code.
One of the best tools as a JS developer is the browser web console, it is powerful and packed with everything you need.

For example did you know that you could trace the path, or even format output?

For a full list of methods and example read here:

Another useful tool you have at your disposal right in the browser is the debugger

I personally tend to stick with console methods for almost all the debugging/inspections, except for when I know some code has the power to crash everything, in that case debugger is my way to go.

Awesome contributors works trying to make the JS curriculum as smooth as possible, but the reality is that at a certain point, you’ll always hit some blockers.
Don’t let them put you down and don’t treat them as your enemies, they are your allies that helps you increase your knowledge and confidence.

Good luck and happy coding :sparkles:

This is actually a very useful tool. I’m always trying to convince new students to sit down with a pencil and paper to walk through the logic of their code.

Yeah. It gets pretty hard. This is a difficult subject to learn and it takes time and a lot of practice.

If you find yourself doing this often, I encourage you to come to the forum and get interactive help before looking at hints. Reading and understanding solutions is a skill, but it’s a different skill than learning to build those solutions yourself.

I’m not sure what you mean by this, but you should use whatever resources you find helpful.

Hello @Marmiz I tried your solution and begin to learn debugging with console, wow I never find this awesome. Thanks!

What I mean is, for example:

HTML curriculum, I start from beginning, to CSS, to Certificate. All in order.

Meanwhile on Javascript curriculum

, “Umm this is hard, I do React first” and then “This is not right, maybe Bootstrap” and then “Let’s see what available here”

Oh and you too @ArielLeslie, Thanks. I’ll visit the forum often and read for find the solution. Even I always scared people be like “Dude, you even can’t solve this?”

But hey it’s the use of forum right? :smiley:

If doing the curriculum in a different order is helping you, then go for it. It doesn’t sound like it’s really helping you though. It’s going to be hard and that’s just part of the process.

Don’t ever worry about being judged because you asked for help. That’s why we’re all here. We want help and we want to help each other. You got this!

1 Like

IMO the JavaScript Algorithms and Data Structures course is hard. My guess is for most people, it would be better to study–in addition to FCC’s very cool stuff–from other sources, as well to fill in the gaps, give repetition and confidence, and allow concepts time and experience to set in before building on shaky foundations. I have bought and gone through books, practiced with other online sources, and built lots of micro-projects that were appropriate for me, and this helped me get through (even then, I didn’t exactly pass with flying colors).

Hey there!

This is my default approach:

  1. I write a bunch of comments to understand the problem, also edge cases
  2. I try to come up with some simple examples
  3. I explain to a kid how they would have to solve it, without any programming techniques like loops etc. (pseudo code)
  4. I write the code from the pseudo code, I’ll probably see some programming techniques popping up, e.g. loops
  5. I check if there are some problems with the edge cases and how to tackle them
  6. I check the code in the visualizer

I never knew this things exist, already try it and feels good.
Easier than using console.log (not sure). Btw, thanks for knowledge.

p.s: I also love Miku :smiley: