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


Groups > comp.lang.javascript > #35943

comma operator?

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

Show all headers | View raw


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 — 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