Exercise 4: Prepend a String
Prepend a string to another string.
We'll cover the following
Problem statement
Skim through the Ruby documentation for strings, and look for a method that prepends one string to another string. Using that method, prepend the first string with the other.
Note: Do not use concatenation to solve this challenge.
Example
string1 = "Machine ", string2 = "Learning"
result = "Machine Learning"
Try it yourself
def prepend_string(string1, string2)result = ""# Start your code herereturn resultend