Skip to content

Conversation

Copy link

Copilot AI commented Jan 16, 2026

  • Document usage of the concat operator |
  • Fix operator precedence table to show | instead of ||
  • Add dedicated Concatenation Operator section with examples
  • Clarify that both operands must be of the same type (both arrays or both strings)
  • Improve table description and note for consistency
Original prompt

Document usage of the concat operator: "|"


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Co-authored-by: Sander-Toonen <5106372+Sander-Toonen@users.noreply.github.com>
Copilot AI changed the title [WIP] Document usage of the concat operator '|' docs: document usage of the concat operator | Jan 16, 2026
Copilot AI requested a review from Sander-Toonen January 16, 2026 12:12
docs/syntax.md Outdated

| Operator | Description |
|:-------- |:----------- |
| a \| b | Concatenates arrays or strings. Both operands must be of the same type. |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@copilot Better explain that, if both arguments are arrays, they will be concattenated as arrays. Else, the operands will be concatenated using string concatenation.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Updated the documentation to clearly explain the behavior with bullet points:

  • If both operands are arrays, they are concatenated as arrays
  • If both operands are strings, they are concatenated as strings
  • If operands are of different types, the result is undefined

Addressed in f416209.

Copilot AI and others added 2 commits January 16, 2026 12:29
Co-authored-by: Sander-Toonen <5106372+Sander-Toonen@users.noreply.github.com>
Co-authored-by: Sander-Toonen <5106372+Sander-Toonen@users.noreply.github.com>
@Sander-Toonen Sander-Toonen marked this pull request as ready for review January 16, 2026 12:37
@Sander-Toonen Sander-Toonen merged commit 30de4ab into master Jan 16, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants