Array Operations
Common array operations in BornomalaScript.
Basic operations include adding, removing, and iterating elements.
dhoro myArr = [
"item1", "item2", "item3",
"item4", "item5", "item6"
]
lekho(myArr.doirgho())
myArr.juktoKoro("item7")
lekho(myArr)
lekho(myArr.doirgho())
myArr.suruThekeJuktoKoro("item0")
lekho(myArr)
lekho(myArr.achheKi("item5"))
myArr.berKoro()
lekho(myArr)
myArr.suruThekeKato()
lekho(myArr)
dhoro newArr = myArr.rupantor("uppercase")
lekho(newArr) // ["ITEM1", "ITEM2", ...]
dhoro filtered = myArr.chinhitoKoro("3")
lekho(filtered) // ["item3"]
prottek item erJonno myArr erModdhe {
lekho(item)
}
myArr.shajao()
lekho(myArr)
myArr.ulotoKoro()
lekho(myArr)
lekho(myArr.khujo("5")) // "item5"
dhoro myArr = [
"item1", "item2", "item3",
"item4"
]
prottek x erJonno myArr erModdhe {
lekho(x)
jodi (x == "item2") tahole {
thamo
}
}