A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://webplatform.github.io/docs/javascript/operators/comma below:

comma ยท WebPlatform Docs

comma Summary

The comma operator (,) causes two expressions to be executed sequentially.

Syntax
expression1 , expression2
expression1
Any expression.
expression2
Any expression.
Examples

The , operator causes the expressions to be executed in left-to-right order. A common use for the , operator is in the increment expression of a for loop. For example, the for statement allows only a single expression to be executed at the end of every pass through a loop. The , operator allows multiple expressions to be treated as a single expression, so both variables can be incremented.

j=25;
for (i = 0; i < 10; i++, j++)
{
    k = i + j;
}
See also Other articles Attributions

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4