If I have an array like this
[1,2,3]*2 #=> [1,2,3,1,2,3,1,2,3]
But I want to do it to certain length, that length is 1.5 the original array, preferably in one line
[1,2,3].size = 3 [1,2,3,1,2] or something like this
Aucun commentaire:
Enregistrer un commentaire