Ruby - Practice Questions
Ruby Practice Questions
1.2
Exercise

Split string by marker

Finish the function definition below.

Given a string str and another string marker, the function split_string should split the string str with marker and return the array that’s generated.

Note: if value of marker is not provided, split_string should return str split by " ".