35| array. include? (obj)
Earnings true if obj is present in self, false otherwise. | 36| array. index(obj)
Returns the index of the first object in self that is == to obj. Returns nil if not any match is found. | 39| array. insert(index, obj... )
Inserts the given values before the factor with the given index (which may be negative).
include? (obj) → accurate or falseclick to toggle source
Returns true if the offered object exists in self (that is definitely, if any kind of object == anObject), falseotherwise.
a sama dengan [ " a", " b", " c" ]
a. include? (" b" ) #=> true
a. include? (" z" ) #=> phony
index(obj) → int or nilclick to toggle supply
index block → int or zero
index → an_enumerator
Results the index of the initial object in self such that the thing is == to obj. If the block has instead of an argument, returns index of 1st object for which block is accurate. Returnsnil if zero match is found. See also Array#rindex. If not block nor argument has, an enumerator is returned instead.
a = [ " a", " b", " c" ]
a. index(" b" ) #=> 1
a. index(" z" ) #=> nil
a. index #=> you
insert(index, obj... ) → aryclick to toggle origin
Inserts the given beliefs before the factor with the given index (which may be negative).
a = %w a b c d
a. insert(2, 99) #=> [" a", " b", 99, " c", " d" ]
a. insert(-2, 1, a couple of, 3) #=> [" a", " b", 99, " c", 1, a couple of, 3, " d" ]
41| array. join(sep=$, )
Results a thread created by converting every single element of the array to a string, separated by sep. | 42| array. last [or] array. last(n)
Returns the past element(s) of self. If array is empty, the first type returns nil. | 43| mixture. length
Results the number of factors in self. Might be zero.
join(sep=$, ) → strclick to toggle supply
Returns a string created by transforming each component of the...