21 Day Coding Challenge

Hints for solving challenge 20


Here are a few hints addressing some of the common questions/complaints I’m seeing in the forum regarding challenge 20:

There’s a typo in the challenge message.

Just ignore the typo, and write your function to take a string argument with all of its vowels replaced by their 1337 equivalents. If you do this, it will pass.

message.split("") and message.join("") isn’t working.

.split("") returns a new array, and does not modify the given string…see here
.join("") returns a string, and does not modify the given array…see here

regular expressions eg. “/0/g”

One way to approach this challenge with minimal code is the use of regular expressions. If you choose this route, make sure to include the global flag so it doesn’t stop after the first match. This is my favourite website for checking regular expressions.

Happy coding! :sunglasses: