Last active
December 25, 2015 09:59
-
-
Save IQAndreas/6958147 to your computer and use it in GitHub Desktop.
Shorter version of code for http://codereview.stackexchange.com/a/32624/30715
This file contains hidden or 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
var vowels = ['a', 'e', 'i', 'o', 'u']; | |
'abcdefghijklmnopqrstuvwxyz'.replace(/[a-z]/g, function (l) { | |
if (l === 'z') return 'A'; | |
l = String.fromCharCode(l.charCodeAt(0) + 1); | |
return (vowel.indexOf(l) != -1) ? l.toUpperCase() : l; | |
}); //bcdEfghIjklmnOpqrstUvwxyzA |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment