0

Indents

Hi everyone. Perhaps I just need more practice but is there a cheat sheet in terms of indents? I always end up indenting wrong when nesting. Thanks in advance!

10th Aug 2021, 2:53 AM
Mannsfate
2 Réponses
+ 3
Use a proper code editor. For example, using VS Code for JavaScript codes, there is a "format code" option, which automatically fix the indentation.
10th Aug 2021, 3:48 AM
Gordon
Gordon - avatar
+ 2
You can sort of think of it as boxes, when you indent you put it inside the box. That sort of helped me, and using a code editor that automatically does it for you(pycharm also has some plugins where you can highlight indents in different colors) is a better solution :)
20th Aug 2021, 3:41 AM
Chloe
Chloe - avatar