Is there a way to transform a string into multiple variables? If I try:
string = "string1 string2 string3 string4"
string.split(" ")
I know that I will get an array:
=> ["string1", "string2", "string3", "string4"]
But I need a piece of code to transform string
into multiple strings, something like this:
string1 = "string1"
string2 = "string2"
string3 = "string3"
string4 = "string4"
Is there a way to do that?