DEV Community 👩‍💻👨‍💻

Discussion on: Is `this` in Javascript bad?

rrackiewicz profile image
rrackiewicz • Edited on

As long as you are using some other library/framework you will always have to deal with "this". At least we have arrow functions now to avoid the "that". MJP of Fun Fun Function fame on YouTube refers to this as a "clown rainbow trap." Watch here

However, if you are rolling your own solution you can eliminate "this" all together if you chose. Douglas Crockford has forsaken "this" Another opinion can be found here I believe this technique is called the "Revealing Module Pattern"