TIL - Ruby Array Multiplication
Today I learned that if you call a multiplication operator on a Ruby array, it duplicates each element of the array by the multiplier. Not sure what the use case would be. For fun, I created an exponent operator for array as well, using this functionality.
Post a comment