Tag Archives: Ruby Array-class

Array#max() : max() is a Array class method which returns the maximum value in this array. Syntax: Array.max() Parameter: Array Return: the maximum value in… Read More
Array#map!() : map!() is a Array class method which returns a new array containing the values returned by the block. Syntax: Array.map!() Parameter: Array Return:… Read More
Array#map() : map() is a Array class method which returns a new array containing the values returned by the block. Syntax: Array.map() Parameter: Array Return:… Read More
Array#length() : length() is a Array class method which returns the number of elements in the array. Syntax: Array.length() Parameter: Array Return: the number of… Read More
Array#keep_if() : keep_if() is a Array class method which returns the array element that satisfy the given condition. Syntax: Array.keep_if() Parameter: Array Return: the array… Read More
Array#sort() : sort() is a Array class method which returns a new array created by sorting self Syntax: Array.sort() Parameter: Array Return: a new array… Read More
Array#slice!() : slice!() is a Array class method which seletes the element(s) given by an index or by a range. Syntax: Array.slice!() Parameter: Array Return:… Read More
Array#slice() : slice() is a Array class method which returns a subarray specified by range of indices. Syntax: Array.slice() Parameter: Array Return: a subarray specified… Read More
Array#size() : size() is a Array class method which returns the length of elements in the array. Syntax: Array.size() Parameter: Array Return: the length of… Read More
Array#shuffle!() : shuffle!() is a Array class method which shuffles elements in self in place. Syntax: Array.shuffle!() Parameter: Array Return: shuffles elements in self in… Read More
Array#shuffle() : shuffle() is a Array class method which returns a new array with elements of self shuffle. Syntax: Array.shuffle() Parameter: Array Return: a new… Read More
Array#shift() : shift() is a Array class method which removes the first element of self and returns it or nil if the array is empty.… Read More
Array#transpose() : transpose() is a Array class method which returns the length of elements in the array transposes the rows and columns. Syntax: Array.transpose() Parameter:… Read More
Array#zip() : zip() is a Array class method which Converts any arguments to arrays, then merges elements of self with corresponding elements from each argument.… Read More
Array#to_s() : to_s() is a Array class method which returns self array. Syntax: Array.to_s() Parameter: Array Return: self array Example #1 : filter_none edit close… Read More