Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8640861
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 12, 20262026-06-12T11:22:54+00:00 2026-06-12T11:22:54+00:00

Possible Duplicate: Javascript syntax: what comma means? I came across the code while reading

  • 0

Possible Duplicate:
Javascript syntax: what comma means?

I came across the code while reading this article (do a Ctrl+F search for Andre Breton):

//function returning array of `umbrella` fibonacci numbers
function Colette(umbrella) {
  var staircase = 0, galleons = 0, brigantines = 1, armada = [galleons, brigantines], bassoon;
  Array.prototype.embrace = [].push;

  while(2 + staircase++ < umbrella) {
    bassoon = galleons + brigantines;
    armada.embrace(brigantines = (galleons = brigantines, bassoon));
  }

  return armada;
}

What does the x = (y = x, z) construct mean? Or more specifically, what does the y = x, z mean? I’m calling it comma assignment because it looks like assignment and has a comma.

In Python, it meant tuple unpacking (or packing in this case). Is it the same case here?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-12T11:22:55+00:00Added an answer on June 12, 2026 at 11:22 am

    This is the comma operator.

    The comma operator evaluates both of its operands (from left to right)
    and returns the value of the second operand.

    The resultant value when a,b,c,…,n is evaluated will always be the
    value of the rightmost expression, however all expressions in the
    chain are still evaluated (from left to right).


    So in your case, the assignations would still be evaluated, but the final value would be bassoon.

    Result:

    galleons = brigantines
    brigantines = bassoon
    armada.embrace(basson)
    

    More information: Javascript "tuple" notation: what is its point?

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Possible Duplicate: Javascript syntax: what comma means? What does this pattern return? How does
Possible Duplicate: Question on this JavaScript Syntax (“What Does This Do?”) in this article
Possible Duplicate: Question on this JavaScript Syntax (“What Does This Do?”) What is the
Possible Duplicate: JavaScript: Know when an image is fully loaded I have this code:
Possible Duplicate: What does this JavaScript/jQuery syntax mean? I specifically mean when you do
Possible Duplicate: How does this JavaScript/JQuery Syntax work: (function( window, undefined ) { })(window)?
Possible Duplicate: Syntax highlighting code with Javascript I have noticed that Stack Overflow uses
Possible Duplicate: JavaScript Function Syntax Explanation: function object.myFunction(){..} I've seen some (legacy) javascript code
Possible Duplicate: JavaScript losing “this” object reference with private/public properties Why does the second
Possible Duplicate: What do parentheses surrounding a JavaScript object/function/class declaration mean? What does this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.