tlosaMoLenaane
Removes values at an array index.
tlosaMoLenaane(lenaane, tshimologo, [palo])Mutates the array by removing values at a zero-based start index. The default removal count is 1. Returns an array of the removed values. A count of 0 removes nothing. Negative starts count from the end; removal beyond the remaining length stops at the end. An out-of-range start returns an empty array. This removal interface does not insert replacement values.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
lenaane | lenaane | An array of values. |
tshimologo | palo | Zero-based start index; negative values count from the end. |
palo (optional) | palo | Number of values to remove; defaults to 1. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(320, 220);
bokamorago(235);
diri mafelo = [60, 120, 180, 240];
tlosaMoLenaane(mafelo, 1, 2);
gopheta (diri x mo mafelo) {
thalaSediko(x, 110, 24);
}
emisaPoapoeletso();
}