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


Groups > comp.lang.javascript > #35944

Re: comma operator?

From Luca <luca@please.nospam.it>
Newsgroups comp.lang.javascript
Subject Re: comma operator?
Date 2019-01-01 18:24 -0500
Organization Aioe.org NNTP Server
Message-ID <q0gsrh$jua$1@gioia.aioe.org> (permalink)
References <q0gsa4$iad$1@gioia.aioe.org>

Show all headers | View raw


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

On 1/1/2019 6:15 PM, I wrote:
> 
> Not sure how to google for this. What's the use of the comma operator 
> used like this in JS?
> 
>   let matrix = [], row;
> 
> I am studying this React.js example and the construct above is puzzling me.
> 
> https://github.com/danielr18/memory-grid-game/blob/master/lib/Game.js#L18
> 
> thanks
> 
> 

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