I have string it contains some code. I want to make some changes on it. There is a for loop I want to modify with js.
The loop:
"for i in 0..10 loop"
I want it to be:
"for (var i=0; i<10; i++)"
It sounds me very complicated. What should be the easiest approach?
Here’s a way to do it, but probably not the best:
Example.