JavaScript

Adrian Sanchez
seal-mask
.a{fill-rule:evenodd;}techdegree
Adrian Sanchez
Full Stack JavaScript Techdegree Student 3,160 Points

how can I make code simpler when a challenge requires to do so but my mind goes blank for hours?

I'm really struggling to understand when and where to use the loops one of my issues is that I can't remember the correct format for what goes inside the loops like for(){}.i can spend hours scratching my head and I still won't find an answer unless I do some "investigation " or I just give up and look for the answer.

Adam VanSlyke
Adam VanSlyke
15,979 Points

Hey Adrian,

I like to keep reference text files on my computer containing examples of commonly used JavaScript syntax.

For example -- I used a text editor/IDE called 'Atom' that allows me to quickly access a text file that has an example of a for loop inside. I quickly open that up and immediately see the for loop syntax.

Hope this helps.

Adrian Sanchez
seal-mask
.a{fill-rule:evenodd;}techdegree
Adrian Sanchez
Full Stack JavaScript Techdegree Student 3,160 Points

Adam VanSlyke thanks a lot I definitely will start to take notes on atom as well since I found that text editor more effective. I am also trying to figure out a method to figure out how can I solve the challenge by using what I learned and not what I researched. in any case thanks for the help.

Adam VanSlyke
Adam VanSlyke
15,979 Points

Ah, I misread. It sounds like you're trying to memorize the syntax?

I personally would not worry about memorizing syntax, but rather just make sure you understand what it's doing. Memorization will probably only happen after using the syntax over and over.

Adrian Sanchez
seal-mask
.a{fill-rule:evenodd;}techdegree
Adrian Sanchez
Full Stack JavaScript Techdegree Student 3,160 Points

Adam VanSlyke one last question lets say I have a challenge where I can use any loop. In this case, would I just go with the one I can remember and later on refine it?. I appreciate the feedback.

Adam VanSlyke
Adam VanSlyke
15,979 Points

I don't have enough experience to answer that correctly for JavaScript. My experience learning others things has lead me to not worry too much about the 'best possible solution' when I start learning.

Just make stuff and eventually you'll start to recognize what the best tool is for that particular job.