Last active
July 12, 2018 21:08
-
-
Save brianfiszman/c77d2c06a4afd5f82615645ca4eeccd8 to your computer and use it in GitHub Desktop.
Log vowels and then consonants of a string
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Complete the vowelsAndConsonants function. | |
* Print your output using 'console.log()'. | |
*/ | |
const vowelsAndConsonants = s => | |
console.log( | |
s.match(/[aeiou]/gi).join("\n") + | |
"\n" + | |
s.match(/[^aeiou0-9_\W]/gi).join("\n") | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment