Member-only story
7 adorable web development tricks
Wrap up of some interesting and fun HTML, CSS, and JS tips & tricks
By now, all major web development languages can be considered as matured. With more than 2 decades of development each, HTML, CSS, and JavaScript are globally-respected standards of the web. But, that’s just a mere fact leading us to the main topic of this post. Today, I’d like to demonstrate to you 7 interesting and lesser-known tips/tricks, that these 3 languages have developed over the years. Believe me or not — there’s some stuff that even more experienced web developers may not know about. Maybe it’s just because not everything is equally useful… Anyway, let’s dig deep and have some fun!
7. Boolean conversion
Type-safety and JavaScript can seem like two completely different concepts. Keeping track of all dynamic types in JS can be quite a hard task. Yet still, it can result in better performance, with the written code being easier to process by the JIT compiler. Using types other than boolean in e.g. conditional expressions is a common example of such mistakes. But, there’s a trick for that!
Remember logical NOT operator (!
)? It is a simple, fast, and elegant way of converting a given value to the opposite boolean value. But what if we want our boolean to represent exactly the…