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 trialZachary Davidson
Full Stack JavaScript Techdegree Graduate 14,454 PointsWeird indent on arrow functions with addEventListener in workspace
Every time I start a writing a new line of an arrow function when passing arguments to addEventListener the workspace will indent the next line 6-7 times. This only happens with addEventListener. Super annoying but not anything critical. Anyone else know how to stop this?
2 Answers
babyoscar
12,930 PointsI've had this same problem before, someone told me just to use two spaces. That should work fine.
Zaid Khan
12,769 Pointsoh yes, I remember that indent, I hate it too. Sorry, I don't have any cure for that but after a few days of learning JS, I moved to VS code where you don't have to worry about indenting. It does it for you.
Zachary Davidson
Full Stack JavaScript Techdegree Graduate 14,454 PointsI was using VS code before but its nice being able to ctrl+tab to switch between tabs and stay in chrome when viewing the code and preview. For the most part the workspace is great.
Zachary Davidson
Full Stack JavaScript Techdegree Graduate 14,454 PointsZachary Davidson
Full Stack JavaScript Techdegree Graduate 14,454 PointsThat's what I was doing, but its annoying to have to delete the indentations space by space.
babyoscar
12,930 Pointsbabyoscar
12,930 PointsYeah, unfortunately I don't know how to fix that.