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


Groups > comp.lang.javascript > #35945

Re: comma operator?

From rbowman <bowman@montana.com>
Newsgroups comp.lang.javascript
Subject Re: comma operator?
Date 2019-01-01 17:09 -0700
Message-ID <g92dmlF1ht4U1@mid.individual.net> (permalink)
References <q0gsa4$iad$1@gioia.aioe.org> <q0gsrh$jua$1@gioia.aioe.org>

Show all headers | 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