Skip to content

Commit

Permalink
Merge pull request mouredev#4871 from piyunior/main
Browse files Browse the repository at this point in the history
RETO mouredev#1 EL LENGUAJE HACKER - JAVASCRIPT
  • Loading branch information
Roswell468 authored Sep 4, 2023
2 parents ed8d4bf + 0bcef1b commit ef62fdd
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions Retos/Reto #1 - EL LENGUAJE HACKER [Fácil]/javascript/piyunior.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
const replaceLetters = {
"A": "4",
"B": "I3",
"C": "[",
"D": ")",
"E": "3",
"F": "|=",
"G": "&",
"H": "#",
"I": "1",
"J": ",_|",
"K": ">|",
"L": "1",
"M": "/\\/\\",
"N": "^/",
"O": "0",
"P": "|*",
"Q": "(_,)",
"R": "|2",
"S": "5",
"T": "7",
"U": "(_)",
"V": "\\/",
"W": "\\/\\/",
"X": "><",
"Y": "j",
"Z": "2",
" ": " ",
"1": "L",
"2": "R",
"3": "E",
"4": "A",
"5": "S",
"6": "b",
"7": "T",
"8": "B",
"9": "g",
"0": "o",
}

async function checkWord(letters) {
let newWord = '';
for (let i of letters) {
newWord += replaceLetters[String(i).toUpperCase()];
}
return newWord;
}

(async function () {
await checkWord('Hola Mundo').then((result) => {
console.log(result);
});
})();

0 comments on commit ef62fdd

Please sign in to comment.