All Tips

Up your design pattern game in JS

Here is an awesome site - Design-Pattern-Javascript, small game to get you familiar with all the 23 Gang of Four design patterns implemented in JavaScript. I like the approach to test yourself using questionnaires, something similar that I had build for HTTP status code - What’s my HTTP status code.

The site simply shows a JS code snippet which is a pattern and gives 4 options to answer the pattern that is implemented. At the end, you get to know your score.

There is also quick reference available on the site

Screenshot

How much did I score? I scored 17/23, but to be honest, I could only get 10-12 identification at first go, rest I just eliminated other 3 options out of 4.

All the code samples on the site are taken from this Design-Patterns-JS by Felipe Beline.

If you want a deeper dive into the subject feel free to check out Learning JavaScript Design Patterns by Addy Osmani.

Official Site: Design-Pattern-Javascript


Published May 1, 2019

Web/Product Engineer.