DEV Community

loading...

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

flaviabastos profile image Flávia Bastos Originally published at flaviabastos.ca on ・1 min read

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.

_The post Do I need to indent my Python code? What about JavaScript? was originally published at _flaviabastos.ca

Discussion (0)

Forem Open with the Forem app