Ruby | Array slice!() function
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: Deletes the elements given by an index or by a range. Example #1 : Ruby # Ruby code for slice!() method # declaring array a = [18, 22, 33, n