Do I need to indent my Python code? What about JavaScript?

JavaScript Python Quick-Tip

Yes! Indentation, or leading white space at the beginning of a line is required in Python. You can read more about why that is important here. And here is the part of the style guide convention for indentation (PEP 8).

In JavaScript on the other hand, white space is added for readability only but it should be consistent through all the code base.


Thank you for reading!

I'd love to hear your thoughts — let's keep the conversation going on X: @Flavia_SBastos

SHARE X/Twitter | LinkedIn | Email |