Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #35947
| Newsgroups | comp.lang.javascript |
|---|---|
| Subject | Re: comma operator? |
| From | "Evertjan." <exxjxw.hannivoort@inter.nl.net> |
| References | <q0gsa4$iad$1@gioia.aioe.org> <q0gsrh$jua$1@gioia.aioe.org> <g92dmlF1ht4U1@mid.individual.net> |
| Date | 2019-01-02 09:34 +0100 |
| Message-ID | <XnsA9CB615784DE0eejj99@194.109.6.166> (permalink) |
rbowman <bowman@montana.com> wrote on 02 Jan 2019 in comp.lang.javascript: > 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. What about:? const a,b,c,d; It seems to be the ideal form of content exclusion. Spoiler: Uncaught SyntaxError: Missing initializer in const declaration -- Evertjan. The Netherlands. (Please change the x'es to dots in my emailaddress)
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll 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