Using a state machine instead. As we developers evolve, hopefully, we realize that our coding habits must improve. This happens to me all the time. When I see code that I wrote a year ago as I go back to add new things, sometimes I feel that it needs rewriting. Sometimes I do it. In this improvement process, reading good JS books is a key step. If you still use a lot of “if”s, I hope that this article and these recommended books help you.

If you have an if (and perhaps an else) and a nested if, and another…

I’m trying to get the most out of all the new things in ES6 (ES2015). And I’m writing a new library where I need a Factory. So I wondered how I could take advantage of all the new stuff to do this, whilst not forgetting that all ES5 continues to be valid and useful side-by-side to ES6.

I researched and googled it because there are very smart coders out there that usually ask this type of questions, before I do, and have smart answers. It was quite difficult to get results, and I couldn’t find any that combined both areas…

SntsDev

Thoughts about front-end programming

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store