I keep effing up my {brackets}. Tips from pros please?


I am having the hardest time keeping track of my { }'s. Does anyone have any amazing tips on how to master it? Will it get easier with practice?


Indenting is the most used and effective way
u should consider using tabs for that
look for chained lines horizontally, there are 2
the start curly braces and the ending curly braces are in same line (not compulsory, but a good practice)
see here, after the opening curly braces of the first if statement
the nested if statement started leaving a TAB from the left hand side.

or else start using a good autocomplete IDE like NETbeans etc etc.


Thanks so much, I will definitely be more disciplined about that!


You can also use codecademy labs to find errors in your code faster. It highlights the line of code where you have an error.