21 Day Coding Challenge

Code 20 Passed test, but shouldn't have


I did a .split / .join function without checking the hint or looking in the forums first. When I looked more carefully it appears that this is another poorly written challenge. “1” can either be “i” eg. th1s or in one place it’s an “l” w021d. When I ran my code, I never looked for “1d” so my answer should be wrong.

var theMessage = message.split(‘1’).join(‘i’);

Any word why mine worked?


I got this way to work as well, but could not get it to work using .replace() method.


Well technically, the L is a typo on their part. The challenge clearly states that it’s the vowels that aren’t processed properly.


In order to complete the replace method you do something like this.
return message.replace(/0/g, “o”).replace(omitted).


I’m guessing the REAL message does’nt have a the same erroneous substitution as the sample message - so there’s no problem.
I ignored it and and mine worked fine.

1 Like

thank you! this helped me figure out why my code wasn’t working.

1 Like