kopololaKarolo
Copies a range of array values.
kopololaKarolo(lenaane, [tshimologo], [bofelo])Returns a new array without changing the original. The start is inclusive and the end is exclusive. Defaults are start 0 and end equal to the array length. Negative indices count from the end. This is a shallow copy: objects inside are shared, not cloned. Omit both bounds to copy the entire array.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
lenaane | lenaane | An array of values. |
tshimologo (optional) | palo | Inclusive start; defaults to 0. |
bofelo (optional) | palo | Exclusive end; defaults to the array length. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(320, 220);
bokamorago(235);
diri mafelo = [60, 120, 180, 240];
diri karolo = kopololaKarolo(mafelo, 1, 3);
gopheta (diri x mo karolo) {
thalaSediko(x, 110, 24);
}
emisaPoapoeletso();
}