a tumblelog
Mon 12 Apr 2021

Use console.log() like a pro

Using console.log() for JavaScript debugging is the most common practice among developers. But, there is more…

The console object provides access to the browser’s debugging console. The specifics of how it works vary from browser to browser, but there is a de facto set of features that are typically provided.

Source: Use console.log() like a pro, an article by Marko Denic.

Using the Switch(true) Pattern in JavaScript

The fundamental principle of the switch true pattern is that you can match against expressions as well as values. An expression in a case will be evaluated before matching. If the expression in your case evaluates to true - it will be matched.

Source: Using the Switch(true) Pattern in JavaScript, an article by Seán Barry.