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


Groups > comp.lang.javascript > #35945

Re: comma operator?

Path csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
From rbowman <bowman@montana.com>
Newsgroups comp.lang.javascript
Subject Re: comma operator?
Date Tue, 1 Jan 2019 17:09:11 -0700
Lines 15
Message-ID <g92dmlF1ht4U1@mid.individual.net> (permalink)
References <q0gsa4$iad$1@gioia.aioe.org> <q0gsrh$jua$1@gioia.aioe.org>
Mime-Version 1.0
Content-Type text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding 7bit
X-Trace individual.net C4rRK43KCYaDcYKBA82gfgszdJg7lcx1rNktspwIUytGS+XSjC
Cancel-Lock sha1:JEHZTPXxAKLen85wYJrwQmrcEQA=
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.6.0
In-Reply-To <q0gsrh$jua$1@gioia.aioe.org>
Xref csiph.com comp.lang.javascript:35945

Show key headers only | View raw


On 01/01/2019 04:24 PM, Luca wrote:
> I think I get it now. It's a simple use of "let" to declare two
> variables to be used within the module. The first variable is also
> initialized as an empty list.
>
> Sorry for the confusion

Comma separated lists of variables have been around since FORTRAN if not 
before. It saved work when you were using punch cards but it can be 
confusing and lead to errors.

let a, b, c, d = 3;

may or may not do what the programmer intended. I've always preferred 
explicit, one variable per line, declarations but that's just me.

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


Thread

comma operator? Luca <luca@please.nospam.it> - 2019-01-01 18:15 -0500
  Re: comma operator? Luca <luca@please.nospam.it> - 2019-01-01 18:24 -0500
    Re: comma operator? rbowman <bowman@montana.com> - 2019-01-01 17:09 -0700
      Re: comma operator? "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2019-01-02 09:34 +0100
  Re: comma operator? Abhinav Sharma <a.sharma.nitk@gmail.com> - 2019-01-02 00:32 -0800
    Re: comma operator? Luca <luca@please.nospam.it> - 2019-01-02 08:17 -0500

csiph-web