forked from mouredev/retos-programacion-2023
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
e2d753d
commit 82ce398
Showing
1 changed file
with
41 additions
and
0 deletions.
There are no files selected for viewing
41 changes: 41 additions & 0 deletions
41
Retos/Reto #1 - EL LENGUAJE HACKER [Fácil]/javascript/alfonso-ramos.js
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
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") |