From 7a70ebdb42ebe4cca2ceb9eca8322a564ac5168b Mon Sep 17 00:00:00 2001 From: Vichum <100027914+ElVichum@users.noreply.github.com> Date: Fri, 4 Oct 2024 17:58:44 +0000 Subject: [PATCH 1/3] setup --- src/app.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app.js b/src/app.js index f129d1c9e..194de71da 100644 --- a/src/app.js +++ b/src/app.js @@ -5,7 +5,4 @@ import "./style.css"; import "./assets/img/rigo-baby.jpg"; import "./assets/img/4geeks.ico"; -window.onload = function() { - //write your code here - console.log("Hello Rigo from the console!"); -}; +window.onload = function() {}; From 74e31dea1916a10d82e1c62aa4ba7e57e505c110 Mon Sep 17 00:00:00 2001 From: Vichum <100027914+ElVichum@users.noreply.github.com> Date: Fri, 4 Oct 2024 18:26:53 +0000 Subject: [PATCH 2/3] ejercicio completado --- src/app.js | 26 +++++++++++++++++++++++++- src/index.html | 8 ++------ 2 files changed, 27 insertions(+), 7 deletions(-) diff --git a/src/app.js b/src/app.js index 194de71da..72401c3f8 100644 --- a/src/app.js +++ b/src/app.js @@ -5,4 +5,28 @@ import "./style.css"; import "./assets/img/rigo-baby.jpg"; import "./assets/img/4geeks.ico"; -window.onload = function() {}; +window.onload = function() { + let a = ["el", "nuestro"]; + let b = ["Gran", "Mejor", "Pequeño"]; + let c = ["Lebowsky", "Isra"]; + + function generarDominios(a, b, c) { + let dominios = []; + + for (let i of a) { + for (let j of b) { + for (let k of c) { + let dominio = i + j + k + ".com"; + dominios.push(dominio); + } + } + } + + return dominios; + } + + let combinaciones = generarDominios(a, b, c); + combinaciones.forEach(dominio => console.log(dominio)); + + document.getElementById("domainNames").innerHTML = combinaciones.join("
"); +}; diff --git a/src/index.html b/src/index.html index e275741cf..968404739 100644 --- a/src/index.html +++ b/src/index.html @@ -14,16 +14,12 @@
-

Hello Rigo!

+

Genera esos dominios!

-

+

If this text is not centered and yellow, you probably have an error

-
- Made with ❤️ by - 4Geeks Academy -
From 584627c0ebffaf33d1d6bcb1937e397aac7e5de6 Mon Sep 17 00:00:00 2001 From: Vichum <100027914+ElVichum@users.noreply.github.com> Date: Fri, 4 Oct 2024 18:48:45 +0000 Subject: [PATCH 3/3] =?UTF-8?q?reto=201=20a=C3=B1adido?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/app.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/app.js b/src/app.js index 72401c3f8..c7653413a 100644 --- a/src/app.js +++ b/src/app.js @@ -9,6 +9,7 @@ window.onload = function() { let a = ["el", "nuestro"]; let b = ["Gran", "Mejor", "Pequeño"]; let c = ["Lebowsky", "Isra"]; + let d = [".es", ".com", ".net", ".tv", ".io"]; function generarDominios(a, b, c) { let dominios = []; @@ -16,8 +17,10 @@ window.onload = function() { for (let i of a) { for (let j of b) { for (let k of c) { - let dominio = i + j + k + ".com"; - dominios.push(dominio); + for (let l of d) { + let dominio = i + j + k + l; + dominios.push(dominio); + } } } }