T019error

Unexpected comma

A comma is used where it is not an operator.

Commas only separate arguments, array items and object entries. The usual cause is a p-for loop with two variables written without parentheses.

Enclose loop variables in parentheses, such as (index, item) in collection.

$ piko explain T019

Build output ends each diagnostic with a link to this page, and editors using the Piko language server link the code under the squiggle. Look for CodeUnexpectedComma in Piko's source to see where it is reported.