I try to code some function. I want to change every 2nd letter .toUpperCase. I get it to work with str.char[0].toUpperCase but have to do it with the whole char numbers manually (char[0],char[1],char[2]) and so on.
Can someine help me out with an array which transforms a given string like this:
teststring to: tEsTsTrInG.
My problem is to built an array which takes every second letter of given string and changes it .toUpperCase.
You can do it with this obscene regex: