DEV Community

Discussion on: Why do we write JavaScript like this?

 
anders profile image
Anders

Thanks for that response.

I agree, consistency is key. Which is why on my projects there are always a set of coding guidelines that are enforced in terms of naming, spacing, comments, all that.

I do use the "this" keyword relatively frequently however myself, specifically from within member functions of an object, to access member data or other member functions.

Thread Thread
 
functional_js profile image
Functional Javascript

That's because of your Object-oriented approach to programming.

I use a functional approach, so everything in that list I linked to in my last post are unnecessary.

Without those constructs, there is almost nothing left but funcs themselves, specifically, arrow funcs.