Created
January 8, 2017 13:48
-
-
Save LuxXx/11f4455c35ef09efb87b99889f786934 to your computer and use it in GitHub Desktop.
ninjaize your name
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
const chars = { | |
a: 'ka', | |
b: 'zu', | |
c: 'mi', | |
d: 'te', | |
e: 'ku', | |
f: 'lu', | |
g: 'ji', | |
h: 'ri', | |
i: 'ki', | |
j: 'zu', | |
k: 'me', | |
l: 'ta', | |
m: 'rin', | |
n: 'to', | |
o: 'mo', | |
p: 'no', | |
q: 'ke', | |
r: 'shi', | |
s: 'ari', | |
t: 'chi', | |
u: 'do', | |
v: 'ru', | |
w: 'mei', | |
x: 'na', | |
y: 'fu', | |
z: 'zi', | |
}; | |
function ninjaize(name) { | |
let ninjaName = ''; | |
for (char of name.toLowerCase()) { | |
ninjaName += chars[char]; | |
} | |
return ninjaName | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment