Paradoxical Truth and JavaScript

Even the set is confused

JavaScript lacks a Boolean data type proper, but has a Boolean object class which can be used as a wrapper for storing and handling its two Boolean values. However, paradoxically, such a Boolean object will be automatically interpreted as “true” in Boolean contexts, even if its stored value is “false”.  Be careful of this.

Paradoxical Truth – NYTimes.com.

chevron_left
chevron_right

Leave a comment

Your email address will not be published. Required fields are marked *

Comment
Name
Email
Website

This site uses Akismet to reduce spam. Learn how your comment data is processed.