6 Comments

Loved the plane analogy Stephen! I learned how to use the any built-in function perfectly! 🙌🏻

Expand full comment

Thanks Josep…

Expand full comment

I liked the way you explained in the concept in a simple and easy to understand way, while also relating it practically with real life scenario. Keep writing more Stephen. 🙂

Expand full comment

Thanks Praveen. I’ll definitely try to keep on writing!

Expand full comment

Are there ways to utilize the short-circuiting or are they merely optimization? Put another way, is short-circuiting's behavior only useful for just directly skipping the unnecessary check, or does/can it have other benefits or uses?

Expand full comment

In most instances it’s a performance optimisation, but there are instances when you can use it for other reasons. This is normally when the operation has side-effects (say a function that modifies an object) and you only want that operation to occur for objects until you find your first truthy or falsy value

Expand full comment