+ 11
The code works with the rows of the array (or sub arrays). It convers every element of the sub-array to string and output element with max length from this row. So for the first sub array max len is 1 character, for the second one is 2 characters, and for the third one - 4) First map with x - takes sub-arrays x.map - taks elements y from sub-array x y.to_s.size - rerurn length of the element y that was converted to the string, and we output the max len of the element from every sub-array.
30th Sep 2020, 2:13 AM
Vladimir (temporary inactive)
Vladimir (temporary inactive) - avatar
+ 7
length of the elements of the sub-arrays ) map is like foreach ... the first map takes every sub-array and do second map on every element of the sub-array
30th Sep 2020, 2:20 AM
Vladimir (temporary inactive)
Vladimir (temporary inactive) - avatar
+ 5
sorry for my bad explanation 😂
30th Sep 2020, 2:25 AM
Vladimir (temporary inactive)
Vladimir (temporary inactive) - avatar
0
In html, When i use / for ending code it displays the same results as without / why?plz answer me also
1st Oct 2020, 9:17 AM
shubham Bhati
0
Because you should do test and understand basics first ok first only I also traded challenge but afterwards I understand
2nd Oct 2020, 7:50 AM
Vishal Gowda H.S
Vishal Gowda H.S - avatar