Recently I was trying to check true/false value for an object. I was pretty sure that an empty object is set to true in Javascript (as well as an empty array).
However, when comparing an empty object to true, I always get false.
This was spotted quite late into my Javascript journey, so I would like to share it here
You need better understanding of truthy and falsy values in js... And what is object and what is boolean.