I am trying to delete every 3rd character in string for some reason when i try the function it returns the message unchanged
let counter = 0
function decrypt(message)
{
for(let i = 0; i < message. Length; i++){
counter ++
if(counter == 3){
message[i] = ''
}
}
return message
}
New contributor
Vincent Schultz is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.