{
  "id": "fn-array-append",
  "dataComponent": "array",
  "heading": {
    "title": "append",
    "badges": ["Array", "PARTIAL"]
  },
  "synopsis": "Appends a single item to an existing array (or concatenates strings). Supports partial usage with placeholders.",
  "codeBlocks": [
    "extend(\"array\")\\n\\n// Direct usage\\nsput( array:append(99, [10,20,30]) )\\n// => [10,20,30,99]\\n\\n// Partial usage => supply only the item\\naddX = array:append(\"X\")\\nsput( addX([\"A\",\"B\"]) )\\n// => [\"A\",\"B\",\"X\"]\\n\\n// If the second argument is a single string, the item must be a single string => concatenation"
  ],
  "notes": [
    "Accepts up to two arguments: (item, arrayOrString).",
    "If array is int[], item must be an int. If array is str[], item must be a single string, etc.",
    "If the 'array' is actually a single string, then item must also be a single string, and the result is a concatenation of those two strings.",
    "Missing arguments or placeholders create a partial usage scenario."
  ]
}
