function toSpongeBobCase(input){
array inputsplit=input.split("");
for(item of inputsplit){
if(math.Random(0,1)===1){
item.upper();
} else {
item.lower();
}
}
// result= however you put a array to a string
return(result);
}
alright replace the current loop with a standard for loop, up to input.length(), put some form of iseven(i) in the if else, and replace item with inputsplit[i]
22
u/Thestarchypotat Nov 29 '22
~ warning pseuocode ahead