Return the number of elements contained in the target array.
array.length() => Integer// exampledo val = ["Batman", "Robin", "Superman"]do val.length() // 3
Add an element at the end of an array.
array.push(val) => void// exampledo val = ["Batman", "Superman"]do val.push("Robin") // ["Batman", "Superman", "Robin"]
Remove the last element of an array.
array.pop() => void// exampledo val = ["Batman", "Robin", "Superman"]do val.pop() // ["Batman", "Robin"]
Add an element at position n of an array (shifting the position of all the following elements).
array.insert_at(n, val) => void// exampledo val = ["Batman", "Superman"]do val.insert_at(1, "Robin") // ["Batman", "Robin", "Superman"]
Remove the nth element of an array (unshifting the position of all the following elements).
array.remove_at(n) => void// exampledo val = ["Batman", "Robin", "Superman"]do val.remove_at(1) // ["Batman", "Superman"]
Returns a new array with all the values found in the original array matching the given value.
array.find(x) => Array// exampledo val = ["Batman", "Robin", "Superman", "Batman"]do val.find("Ironman") // []do val.find("Robin") // ["Robin"]do val.find("Batman") // ["Batman", "Batman"]