+ 7

User input to array

You can convert user input to array right? If yes then how? I'll put [FIXED] when I solve this alone, advanced thanks to you :D

1st Mar 2017, 5:14 AM
MrCoder
MrCoder - avatar
5 Answers
+ 9
Yeah it is, but it can support multiple user inputs and arrange them in one array right?
1st Mar 2017, 8:42 AM
MrCoder
MrCoder - avatar
+ 9
@Huan Wang , @Jan Andersson , Hey thanks guys :D I can now do my probably-biggest-project easily :D Your answers are priceless ^.^
1st Mar 2017, 11:33 AM
MrCoder
MrCoder - avatar
+ 3
in addition to Jan, after we get the arrays, i think we can use + method to join different input to one array. another way is to use the push method. i think there are many ways to solve a problem, that's way we learn ruby.^O^
1st Mar 2017, 11:30 AM
Steven Wang
Steven Wang - avatar
+ 1
Variable = gets #gets user input for your var variable.to_a #converts var to array I think this is what your looking for.
1st Mar 2017, 7:40 AM
Jan Andersson
Jan Andersson - avatar
+ 1
Yeah it can
1st Mar 2017, 1:08 PM
Jan Andersson
Jan Andersson - avatar