truthy and falsy
Patty
patty at CRUZIO.COM
Thu Jun 2 15:16:56 UTC 2011
Hi Folks - I just came across the couple words in reading the book, 'JavaScript: The Good Parts' by Douglas Crockford, published in 2008. I don't recall hearing these words in conversation at least locally, here on the West Coast over the last couple years, but here :} they are in printed form. At least, I immediately thought of 'truthiness'. And unable to continue reading because all I could think of was linguistics (who cares about JavaScript?).
There is a paragraph explaining conventions used in the book and Italics are for new terms, filenames and file extensions. And a constant width font is used for commands, options, in the program cmds, etc. So, here are the couple sentences, fyi. I will change my font to reflect this but in case it doesn't come out in peoples display, the words 'truthy' and 'falsy' are in italics and the words 'then' and 'else' and 'true' are in constant width fonts.
------------------- pages 10 -12 (there are lots of <really bizarre> diagrams)
The then block is executed if the expression is truthy; otherwise, the optional else branch is taken.
Here are the falsy values:
.
.
.
All other values are truthy*, including true, the string 'false' and all objects.
---------------
*the word 'truthy' on this line is _not_ italicized
I was about to make an observation about this non-italicizing but then I realized there may be a few different reasons underlying whether to italicize the word on this line or not.
Regards,
Patty
------------------------------------------------------------
The American Dialect Society - http://www.americandialect.org
More information about the Ads-l
mailing list