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 DOM Scripting By Example Adding and Removing Names Registering Names

Weird 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

I've had this same problem before, someone told me just to use two spaces. That should work fine.

That's what I was doing, but its annoying to have to delete the indentations space by space.

Yeah, unfortunately I don't know how to fix that.

oh 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.

I 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.