Truthy & Falsy Values
What will Boolean(new Boolean(false)) return?
Boolean(new Boolean(false)) returns true. This might seem counterintuitive at first. While the boolean primitive false is falsy, new Boolean(false) creates a Boolean object, not a primitive boolean. In JavaScript, all objects (including Boolean objects, regardless of their internal value) are truthy. So when the Boolean() function is called on a Boolean object, it returns true. This is a subtle but important distinction between primitive values and their object wrapper counterparts in JavaScript. It's generally recommended to avoid the Boolean constructor with new and use the Boolean() function or !! for boolean conversion to avoid confusion.