{
  "id": "fn-array-init",
  "dataComponent": "array",
  "heading": {
    "title": "init",
    "badges": ["Array"]
  },
  "synopsis": "Returns a copy of the array without the last element. If the array has 0 or 1 elements, the result is empty.",
  "codeBlocks": [
    "extend(\"array\")\n\narr = [10,20,30]\nsput(array:init(arr))\n# => [10,20]\n\nsput(array:init([123]))\n# => []"
  ],
  "notes": [
    "Takes a single array as argument.",
    "Returns all elements except the last.",
    "No partial usage.",
    "If array is empty or length 1, returns empty array."
  ]
}
