From 79ff7051240d791f49570bf240226853f3d60530 Mon Sep 17 00:00:00 2001 From: Giovany Osorio <30839218+giovanyosorio@users.noreply.github.com> Date: Tue, 14 Nov 2023 22:15:13 +0000 Subject: [PATCH 1/5] Reto #15- js --- .vscode/settings.json | 5 ++ .../javascript/giovanyosorio.js" | 49 +++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 .vscode/settings.json create mode 100644 "Retos/Reto #15 - AUREBESH [F\303\241cil]/javascript/giovanyosorio.js" diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000000..b242572efb --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,5 @@ +{ + "githubPullRequests.ignoredPullRequestBranches": [ + "main" + ] +} \ No newline at end of file diff --git "a/Retos/Reto #15 - AUREBESH [F\303\241cil]/javascript/giovanyosorio.js" "b/Retos/Reto #15 - AUREBESH [F\303\241cil]/javascript/giovanyosorio.js" new file mode 100644 index 0000000000..0835ec8903 --- /dev/null +++ "b/Retos/Reto #15 - AUREBESH [F\303\241cil]/javascript/giovanyosorio.js" @@ -0,0 +1,49 @@ +/* + * Crea una función que sea capaz de transformar Español al lenguaje básico del universo + * Star Wars: el "Aurebesh". + * - Puedes dejar sin transformar los caracteres que no existan en "Aurebesh". + * - También tiene que ser capaz de traducir en sentido contrario. + * + * ¿Lo has conseguido? Nómbrame en twitter.com/mouredev y escríbeme algo en Aurebesh. + * + * ¡Que la fuerza os acompañe! + */ + +const aurebesh = { + 'A': 'Aurek', + 'B': 'Besh', + 'C': 'Cresh', + 'D': 'Dorn', + 'E': 'Esk', + 'F': 'Forn', + 'G': 'Grek', + 'H': 'Herf', + 'I': 'Isk', + 'J': 'Jenth', + 'K': 'Krill', + 'L': 'Leth', + 'M': 'Mern', + 'N': 'Nern', + 'O': 'Osk', + 'P': 'Peth', + 'Q': 'Qek', + 'R': 'Resh', + 'S': 'Senth', + 'T': 'Trill', + 'U': 'Usk', + 'V': 'Vev', + 'W': 'Wesk', + 'X': 'Xesh', + 'Y': 'Yirt', + 'Z': 'Zerek' +} + + +function translateToAurebesh(text) { + return text.split('').map(char => aurebesh[char.toUpperCase()] || char).join(''); +} + + + +console.log(translateToAurebesh('Hola Mundo')); + From 3fda3d813e81a8dfb1de8a2b3b668da0abbdb04d Mon Sep 17 00:00:00 2001 From: giovany osorio Date: Tue, 21 Nov 2023 17:59:02 -0500 Subject: [PATCH 2/5] Reto #24 Javascript --- .../javascript/giovanyosorio.js" | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 "Retos/Reto #24 - CIFRADO C\303\211SAR [F\303\241cil]/javascript/giovanyosorio.js" diff --git "a/Retos/Reto #24 - CIFRADO C\303\211SAR [F\303\241cil]/javascript/giovanyosorio.js" "b/Retos/Reto #24 - CIFRADO C\303\211SAR [F\303\241cil]/javascript/giovanyosorio.js" new file mode 100644 index 0000000000..621e51d1a1 --- /dev/null +++ "b/Retos/Reto #24 - CIFRADO C\303\211SAR [F\303\241cil]/javascript/giovanyosorio.js" @@ -0,0 +1,49 @@ +function cifrar(palabra, clave){ + let letra,respuesta="" + let alfabeto = 'abcdefghijklmnopqrstuvwxyz'; + let cifrado=alfabeto.slice(-clave) + console.log(cifrado) + cifrado+=alfabeto.slice(0,alfabeto.length-clave) + console.log("cifrado "+ cifrado) + console.log(palabra.length) + + for(let i=0;i Date: Tue, 21 Nov 2023 18:02:12 -0500 Subject: [PATCH 3/5] Reto #24 Javascript --- .vscode/settings.json | 5 ----- 1 file changed, 5 deletions(-) delete mode 100644 .vscode/settings.json diff --git a/.vscode/settings.json b/.vscode/settings.json deleted file mode 100644 index b242572efb..0000000000 --- a/.vscode/settings.json +++ /dev/null @@ -1,5 +0,0 @@ -{ - "githubPullRequests.ignoredPullRequestBranches": [ - "main" - ] -} \ No newline at end of file From b44c10e429cac04b0bdd513e9bd3850f4fe800c0 Mon Sep 17 00:00:00 2001 From: Giovany Osorio <30839218+giovanyosorio@users.noreply.github.com> Date: Tue, 21 Nov 2023 19:06:06 -0500 Subject: [PATCH 4/5] =?UTF-8?q?Delete=20Retos/Reto=20#15=20-=20AUREBESH=20?= =?UTF-8?q?[F=C3=A1cil]/javascript/giovanyosorio.js?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../javascript/giovanyosorio.js" | 49 ------------------- 1 file changed, 49 deletions(-) delete mode 100644 "Retos/Reto #15 - AUREBESH [F\303\241cil]/javascript/giovanyosorio.js" diff --git "a/Retos/Reto #15 - AUREBESH [F\303\241cil]/javascript/giovanyosorio.js" "b/Retos/Reto #15 - AUREBESH [F\303\241cil]/javascript/giovanyosorio.js" deleted file mode 100644 index 0835ec8903..0000000000 --- "a/Retos/Reto #15 - AUREBESH [F\303\241cil]/javascript/giovanyosorio.js" +++ /dev/null @@ -1,49 +0,0 @@ -/* - * Crea una función que sea capaz de transformar Español al lenguaje básico del universo - * Star Wars: el "Aurebesh". - * - Puedes dejar sin transformar los caracteres que no existan en "Aurebesh". - * - También tiene que ser capaz de traducir en sentido contrario. - * - * ¿Lo has conseguido? Nómbrame en twitter.com/mouredev y escríbeme algo en Aurebesh. - * - * ¡Que la fuerza os acompañe! - */ - -const aurebesh = { - 'A': 'Aurek', - 'B': 'Besh', - 'C': 'Cresh', - 'D': 'Dorn', - 'E': 'Esk', - 'F': 'Forn', - 'G': 'Grek', - 'H': 'Herf', - 'I': 'Isk', - 'J': 'Jenth', - 'K': 'Krill', - 'L': 'Leth', - 'M': 'Mern', - 'N': 'Nern', - 'O': 'Osk', - 'P': 'Peth', - 'Q': 'Qek', - 'R': 'Resh', - 'S': 'Senth', - 'T': 'Trill', - 'U': 'Usk', - 'V': 'Vev', - 'W': 'Wesk', - 'X': 'Xesh', - 'Y': 'Yirt', - 'Z': 'Zerek' -} - - -function translateToAurebesh(text) { - return text.split('').map(char => aurebesh[char.toUpperCase()] || char).join(''); -} - - - -console.log(translateToAurebesh('Hola Mundo')); - From 1841ab62cd0ccb9839dede75944442b50e3b9689 Mon Sep 17 00:00:00 2001 From: Giovany Osorio <30839218+giovanyosorio@users.noreply.github.com> Date: Wed, 22 Nov 2023 00:11:55 +0000 Subject: [PATCH 5/5] Reto #24 Js --- .../javascript/giovanyosorio.js" | 1 + 1 file changed, 1 insertion(+) diff --git "a/Retos/Reto #24 - CIFRADO C\303\211SAR [F\303\241cil]/javascript/giovanyosorio.js" "b/Retos/Reto #24 - CIFRADO C\303\211SAR [F\303\241cil]/javascript/giovanyosorio.js" index 621e51d1a1..7b8458bf5e 100644 --- "a/Retos/Reto #24 - CIFRADO C\303\211SAR [F\303\241cil]/javascript/giovanyosorio.js" +++ "b/Retos/Reto #24 - CIFRADO C\303\211SAR [F\303\241cil]/javascript/giovanyosorio.js" @@ -26,6 +26,7 @@ function cifrar(palabra, clave){ } + function descifrar(palabra, clave){ let letra,respuesta=""