21 Day Coding Challenge

Challenge 20 "invalid or unexpected token"

#1

I think I am close but I keep getting invalid or unexpected token. What am I not seeing?

function decodeMessage(message) {
var msg = message;
msg = msg.split(‘1’).join(‘i’)
.split(‘2’).join(‘u’)
.split(‘3’).join(‘e’)
.split(‘4’).join(‘a’)
.split(‘5’).join(‘y’);
return msg;
}

#2

Hi Jessica,
That’s an interesting approach :slight_smile: The only thing that seems to be missing is the case for 0.

1 Like
#3

Thank you! It worked!

1 Like