Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript

bennettclark
PLUS
bennettclark
Courses Plus Student 7,036 Points

NodeJS: extra code indentation

In the Node.js courses, especially Node-Basics, Mr. Chalkers indents his code over 10 tabs extra. This event is especially prevalent around where you connect to the API URL, read the data, parse the data, and print the data. Why is this? Is it to be able to identify it easier? I appreciate any reply given. I'm sure I'll feel stupid when I realize how obvious the answer is. Thanks!

1 Answer

You are correct. Since white space is ignored when JavaScript is rendered, the only reason for extra tabs and spaces would be so the code is easier to read and follow.