The purpose of the comma operator in JavaScript (x, x1, x2, …, xn)

Viewed 452

In JavaScript (x, x1, x2, …, xn) always returns xn.

In Python this code is called tuple and it returns different values.

My question is what is the purpose of this code in JavaScript? Do you have some practical example?

3 Answers
Related