Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #32407
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Ben Bacarisse <ben.usenet@bsb.me.uk> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: understanding the expression "ws && ~[2, 3].indexOf(ws.readyState)" |
| Date | Sat, 28 Jan 2017 15:33:38 +0000 |
| Organization | A noiseless patient Spider |
| Lines | 27 |
| Message-ID | <874m0jurl9.fsf@bsb.me.uk> (permalink) |
| References | <o6eo1r$ifl$1@shakotay.alphanet.ch> <878tpwzqct.fsf@bsb.me.uk> <o6fube$62g$1@shakotay.alphanet.ch> <XnsA70B6CBA8F9BCeejj99@194.109.6.166> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=utf-8 |
| Content-Transfer-Encoding | 8bit |
| Injection-Info | mx02.eternal-september.org; posting-host="48548a773e1b9bbc916cd17ab98cd158"; logging-data="24979"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/O8g0eu4LT/9m4yaCLDoe83FsvhCc5hgc=" |
| Cancel-Lock | sha1:Au2V3Lr0w9PTUXuZDfjyhrYwygA= sha1:gEMZLqmpeBtootZ59z4fqh66a/Y= |
| X-BSB-Auth | 1.630c890a1adf2d300ce3.20170128153338GMT.874m0jurl9.fsf@bsb.me.uk |
| Xref | csiph.com comp.lang.javascript:32407 |
Show key headers only | View raw
"Evertjan." <exxjxw.hannivoort@inter.nl.net> writes: <snip> >> Le 27/01/2017 … 12:36, Ben Bacarisse a ‚crit : >>> Any non-zero number (other than NaN) is considered to be true in a >>> Boolean context. > > Please reconsider: What should I be re-considering? > alert(0 == false) // true > alert(0 === false) // false > > alert(17 == true) // false ??????????? > alert(true == 17) // false ??????????? > alert(!!17) // true There is only one example of a non-zero number in a Boolean context there and it behaves as I described. Maybe I should have been explicit about what I meant by a Boolean context. It's where the abstract toBoolean operation is used in the language specification. <snip> -- Ben.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
understanding the expression "ws && ~[2, 3].indexOf(ws.readyState)" Une Bévue <unbewusst.sein@fai.invalid> - 2017-01-27 07:06 +0100
Re: understanding the expression "ws && ~[2, 3].indexOf(ws.readyState)" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-27 11:36 +0000
Re: understanding the expression "ws && ~[2, 3].indexOf(ws.readyState)" Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2017-01-27 13:04 +0100
Re: understanding the expression "ws && ~[2, 3].indexOf(ws.readyState)" Une Bévue <unbewusst.sein@fai.invalid> - 2017-01-27 18:00 +0100
Re: understanding the expression "ws && ~[2, 3].indexOf(ws.readyState)" "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2017-01-28 10:41 +0100
Re: understanding the expression "ws && ~[2, 3].indexOf(ws.readyState)" Ben Bacarisse <ben.usenet@bsb.me.uk> - 2017-01-28 15:33 +0000
Re: understanding the expression "ws && ~[2, 3].indexOf(ws.readyState)" Une Bévue <unbewusst.sein@fai.invalid> - 2017-01-29 09:12 +0100
csiph-web