Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #27884
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!news2.arglkargh.de!news.mixmin.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | Thomas 'PointedEars' Lahn <PointedEars@web.de> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Why does (a,b,c) return only c? |
| Date | Tue, 26 May 2015 14:42:43 +0200 |
| Organization | PointedEars Software (PES) |
| Lines | 45 |
| Message-ID | <2863608.gxWFnX0c9y@PointedEars.de> (permalink) |
| References | <55630af5$0$13000$c3e8da3$5496439d@news.astraweb.com> <gf4c3c-iks.ln1@mail.binaryfoundry.ca> <XnsA4A5DF4D39BAAeejj99@194.109.133.246> <mk07ei$t55$1@speranza.aioe.org> <1687513.QYX3roR0lP@PointedEars.de> <mk1pc4$ajd$1@speranza.aioe.org> |
| Reply-To | Thomas 'PointedEars' Lahn <usenet@PointedEars.de> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset="UTF-8" |
| Content-Transfer-Encoding | 8Bit |
| X-Trace | solani.org 1432644324 17548 eJwNyMEBwCAIA8CViphQxwkU9h/B3vPgNFZsghuDqcE29aRX6K9W2JK/mdaf4NXxiDp5ROTSBTcMEgw= (26 May 2015 12:45:24 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Tue, 26 May 2015 12:45:24 +0000 (UTC) |
| User-Agent | KNode/4.14.2 |
| X-User-ID | eJwNycERwDAIA7CVQoNtGAe4sv8Irb7CpXHkBB2LnbKum8gYtt5/Mpty+XSkSme2YLXJ93RankcIJ49irfEBVcMU9g== |
| Cancel-Lock | sha1:QNmRJaJf0snwPdSjWT+mtQBIF8k= |
| X-NNTP-Posting-Host | eJwFwQEBwDAIAzBLB9oO7DCGfwlPGDLdA1HgcjvKFrLnN8o/wZHsk3mrmouaXBHTTz428wMFehC9 |
| Mail-Copies-To | usenet@PointedEars.de |
| Xref | csiph.com comp.lang.javascript:27884 |
Show key headers only | View raw
Joao Rodrigues wrote:
> On 26/05/2015 07:26, Thomas 'PointedEars' Lahn wrote:
>> Joao Rodrigues wrote:
>>> <https://javascriptweblog.wordpress.com/2011/04/04/the-javascript-comma-operator/>
>>
>> Bogus.
>
> A bit of disdain here.
Pardon?
> See an example:
> […]
Your point being?
>> […]
>> | var a, 5; //a is now 7
^
>> | //SyntaxError: missing variable name
^^^^^^^^^^^^^^^^^^^^^
>> is not a syntax error because “we [haven’t] wrapped the variable
>> assignment in parentheses”, but because _“5” is not a valid variable
^^^^^^^^^^^^^^^^^^^^^^^^^^^
>> name_.
^^^^
> […]
>> The subsequent example in that article, where it works, is
>> […]
>> | var a = 5;
^
>> where not only the parentheses have been inserted, but magically the
^^^^^^^^^^^^^
>> comma has been replaced by a “=”. Surprise.
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> Wrong, […]
Nonsense.
--
PointedEars
FAQ: <http://PointedEars.de/faq> | SVN: <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | ES Matrix: <http://PointedEars.de/es-matrix>
Please do not cc me. / Bitte keine Kopien per E-Mail.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Why does (a,b,c) return only c? Steven D'Aprano <steve@pearwood.info> - 2015-05-25 21:43 +1000
Re: Why does (a,b,c) return only c? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-05-25 14:17 +0200
Re: Why does (a,b,c) return only c? Luuk <luuk@invalid.lan> - 2015-05-25 14:42 +0200
Re: Why does (a,b,c) return only c? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-05-25 14:58 +0200
Re: Why does (a,b,c) return only c? "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-05-25 14:57 +0200
Re: Why does (a,b,c) return only c? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-05-25 15:07 +0200
Re: Why does (a,b,c) return only c? "Christoph M. Becker" <cmbecker69@arcor.de> - 2015-05-25 15:32 +0200
Re: Why does (a,b,c) return only c? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-05-25 17:50 +0200
Re: Why does (a,b,c) return only c? Luuk <luuk@invalid.lan> - 2015-05-25 19:53 +0200
Re: Why does (a,b,c) return only c? "D. Aaron Sawyer" <aaron@110.net> - 2015-05-25 19:49 -0300
Re: Why does (a,b,c) return only c? John-Paul Stewart <jpstewart@sympatico.ca> - 2015-05-25 13:58 -0400
Re: Why does (a,b,c) return only c? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-05-25 21:57 +0200
Re: Why does (a,b,c) return only c? Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-05-25 19:24 -0300
Re: Why does (a,b,c) return only c? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-26 12:26 +0200
Re: Why does (a,b,c) return only c? Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-05-26 09:36 -0300
Re: Why does (a,b,c) return only c? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-26 14:42 +0200
Re: Why does (a,b,c) return only c? Joao Rodrigues <groups_jr-1@yahoo.com.br> - 2015-05-26 09:53 -0300
Re: Why does (a,b,c) return only c? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2015-05-26 15:15 +0200
Re: Why does (a,b,c) return only c? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2015-05-26 15:17 +0200
Re: Why does (a,b,c) return only c? Scott Sauyet <scott.sauyet@gmail.com> - 2015-05-26 08:59 -0700
csiph-web