lenaaneLeNaLe
Checks whether an array contains a value.
lenaaneLeNaLe(lenaane, boleng, [tshimologo])Returns nnete or maaka without changing the array. Numbers and strings compare by value; objects compare by identity, not by matching fields. NaN matches NaN, and +0 matches -0. The optional start defaults to 0; negative starts count from the end.
Parameters
Section titled “Parameters”| Name | Type | Description |
|---|---|---|
lenaane | lenaane | An array of values. |
boleng | boleng | The value to look for. |
tshimologo (optional) | palo | Search start index; defaults to 0. |
Examples
Section titled “Examples”tiro setaLoeto() {
thalaKanefase(320, 220);
bokamorago(235);
diri mafelo = [60, 140, 220];
fa (lenaaneLeNaLe(mafelo, 140)) {
tlatsaMmala(30, 140, 130);
}
thalaSediko(160, 110, 90);
emisaPoapoeletso();
}