Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #7894

Re: meaning of (toto)? true : false

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!eternal-september.org!feeder.eternal-september.org!.POSTED!not-for-mail
From Dr J R Stockton <reply1144@merlyn.demon.co.uk>
Newsgroups comp.lang.javascript
Subject Re: meaning of (toto)? true : false
Date Mon, 31 Oct 2011 18:06:01 +0000
Organization Home
Lines 21
Message-ID <483hG3BJOurOFw$e@invalid.uk.co.demon.merlyn.invalid> (permalink)
References <4eab9340$0$27929$426a34cc@news.free.fr> <a6dra7132v6ul7qp4lbsaofmek24geomnv@4ax.com>
Mime-Version 1.0
Content-Type text/plain;charset=us-ascii
Injection-Info mx04.eternal-september.org; posting-host="UwYDIHu13GPq28RciNoAJA"; logging-data="16866"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/iLZqO7jr1NQ3nMwGVCTxBwFzA7LGsU20="
User-Agent Turnpike/6.05-S (<Zm1ExpsYcscaoC9umG6bCHHRpr>)
Cancel-Lock sha1:kWWWW9zVrqPrnc0ujAQQfwD/e1g=
Xref x330-a1.tempe.blueboxinc.net comp.lang.javascript:7894

Show key headers only | View raw


In comp.lang.javascript message <a6dra7132v6ul7qp4lbsaofmek24geomnv@4ax.
com>, Sun, 30 Oct 2011 21:38:21, Hans-Georg Michna <hans-
georgNoEmailPlease@michna.com> posted:

>? true : false
>is another way to write,
>"I don't understand JavaScript."
>
>If you really have to transform something into a boolean that
>isn't already one, just write !! in front of it, but think again
>whether that is really needed.

One may need more; for example,
        !!   "0"        // true
        !! + "0"        // false

-- 
 (c) John Stockton, Surrey, UK.  ?@merlyn.demon.co.uk   Turnpike v6.05   MIME.
   Web  <http://www.merlyn.demon.co.uk/> - FAQish topics, acronyms, & links.
 Proper <= 4-line sig. separator as above, a line exactly "-- " (SonOfRFC1036)
 Do not Mail News to me. Before a reply, quote with ">" or "> " (SonOfRFC1036)

Back to comp.lang.javascript | Previous | NextPrevious in thread | Find similar | Unroll thread


Thread

meaning of (toto)? true : false Une Bévue <unbewusst.sein@fai.invalid> - 2011-10-29 07:46 +0200
  Re: meaning of (toto)? true : false Une Bévue <unbewusst.sein@fai.invalid> - 2011-10-29 07:53 +0200
  Re: meaning of (toto)? true : false "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2011-10-29 14:47 -0700
    Re: meaning of (toto)? true : false Une Bévue <unbewusst.sein@fai.invalid> - 2011-10-30 05:37 +0100
  Re: meaning of (toto)? true : false Hans-Georg Michna <hans-georgNoEmailPlease@michna.com> - 2011-10-30 21:38 +0100
    Re: meaning of (toto)? true : false Andreas Bergmaier <andber93@web.de> - 2011-10-30 21:55 +0100
      Re: meaning of (toto)? true : false Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2011-10-30 22:00 +0100
    Re: meaning of (toto)? true : false Dr J R Stockton <reply1144@merlyn.demon.co.uk> - 2011-10-31 18:06 +0000

csiph-web