String insert in Ruby for JS

0

How can I make the code below in Ruby for JS.

(3...value_size).step(3) { |num|
   value.insert(value_size - num, separator)
}

For step I think of this loop for (var i = 3; i < value_size; i += 3) , but for the .insert method? What are your ideas?

    
asked by anonymous 20.03.2018 / 02:33

0 answers