comma operator (,)

JSstatementexpressionoperatorbinary ⟩ comma (,)

',' punctuator used in declaration syntax and comma operator.

for(let i=0, j=10; i < j; i++, j-- ) { ... }
//  ╰──── 1 ────╯         ╰── 2 ──╯
// 1. let declaration
// 2. comma operator

Last updated

Was this helpful?