Say that we have a ECMAScript6 class like so: which we instantiate like so: This seems pretty straightforward. But now imagine we’re adding a new scenario and I have a case where we don’t want to call the ensureWPAdminStandardLogonShown method during constructor. There’s two ways I see that we could achieve this: Removing the call … Continue reading “Avoiding boolean traps in es6”

https://watirmelon.blog/2017/02/13/avoiding-boolean-traps-in-es6/