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![](https://ecs-static.teamtreehouse.com/assets/views/marketing/shared/community-banner-white-47072046c51352fe6a69f5e691ff5700b28bb11d45197d7bdf066d9ea3f72d0c.webp)
![Farai Tanekha](https://uploads.teamtreehouse.com/production/profile-photos/11719658/micro_profileImage.webp)
Farai Tanekha
10,669 PointsIndentation & differentiating between regular function and arrow function
Great presentation! I just thought there were 2 things that could be added to make it better:
- Include indentation withing the function body
- Make clear the difference between a regular anonymous function vs an (anonymous) arrow function, as some beginners watching the video may not be aware of this.
For example:
-
Anonymous regular function (declaration):
function (){ \s console.log("I am an anonymous function with clear indentation in my function body.") }
-
Arrow function
()=> { \s console.log("I am an arrow function with clear indentation in my function body.") }
Please, note that I have used the JS metacharacter \s to indicate space/ indentation as I couldn't find the right markdown for it.
1 Answer
![Steven Parker](https://uploads.teamtreehouse.com/production/profile-photos/969492/micro_tool_chess_set_2.jpg)
Steven Parker
230,688 PointsHe had to insert new lines from the bottom to prevent the editor from auto-indenting!
And spaces are not collapsed inside a Markdown code section. So you can just put the actual number of spaces that you want displayed.
For example:
<-- two spaces
<-- eight spaces