Skip to content

Commit

Permalink
Reto mouredev#1 - Javascript
Browse files Browse the repository at this point in the history
  • Loading branch information
alfonso-ramos committed Oct 22, 2024
1 parent e2d753d commit 82ce398
Showing 1 changed file with 41 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
const leetAlphabet = {
"a": "4",
"b": "8",
"c": "[",
"d": ")",
"e": "3",
"f": "/=",
"g": "6",
"h": "#",
"i": "1",
"j": "]",
"k": "1<",
"l": "|",
"m": "|v|",
"n": "/v",
"o": "[]",
"p": "?",
"q": "9",
"r": "|9",
"s": "$",
"t": "/",
"u": "(_)",
"v": "|/",
"w": "2u",
"x": ")(",
"y": "7",
"z": "7_",
" ": " "
}

const conversorLeet = text => {
let leetText = ''
for (char in text){
let alphabetChar = text[char].toLowerCase()
leetChar = leetAlphabet[alphabetChar]
leetText += leetChar
}
console.log(leetText)
}

conversorLeet("Hola mundo soy Poncho Ramos")

0 comments on commit 82ce398

Please sign in to comment.