Ruby | Array replace() function
Array#replace() : replace() is a Array class method which returns an array of all combinations of elements from all arrays. Syntax: Array.replace() Parameter: Array Return: an array of all combinations of elements from all arrays. Example #1 : # Ruby code for replace() method # declaring array a = [