I need to build this function that recieves a string as parameter and returns a string with each single charcater repeated, for example:
'Boolean'.repeatCharacter()
and this should return:
'BBoolleeaann'
I'm stuck in this, because I cant figure how can I pass a string before the function and it works as parameter??
I tried to make a for cycle using split() to separate each single character and after that other cycle using the character position to print the character but it doesnt work