Explaining truthy, falsy, null, 0, and undefined in TypeScript

What is a Truthy or Falsy value?

Every possible variable value of any type will be implicitly converted to a boolean true or false value if needed. The need to do so is usually caused by an if-statement, having a non-boolean condition value. This implicit conversion from non-boolean values to boolean is based on some rules. These rules define for example that all numbers, except 0 and NaN, are converted to true.

The term describes all values that will be converted to true.
The term describes all values that will be converted to false.

const value…


Photo by David Rodrigo on Unsplash

This story happened to me in 2015 while wearing a fitness tracker. In the meantime, I switched to the newer Although I haven’t tested this trick with the new version, it is probably still working. I would even say, this works with most if not all ‘floor counting’ fitness devices.

What is this all about?!

Those fitness tracker devices try to measure your daily activity and overall fitness level.

Since it’s not really possible to look into somebodies actual fitness level, those devices measure health related indicators. …


Photo by Jonatan Pie on Unsplash

When discussing different password strategies with people, I always hear an argument that goes like this.

This argument is only true if you are using different strong passwords for every single of your accounts. If you are not using different strong passwords for every…

me

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