Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Develop #107

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 26 additions & 2 deletions src/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,30 @@ 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!");
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 = [];

for (let i of a) {
for (let j of b) {
for (let k of c) {
for (let l of d) {
let dominio = i + j + k + l;
dominios.push(dominio);
}
}
}
}

return dominios;
}

let combinaciones = generarDominios(a, b, c);
combinaciones.forEach(dominio => console.log(dominio));

document.getElementById("domainNames").innerHTML = combinaciones.join("<br>");
};
8 changes: 2 additions & 6 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,16 +14,12 @@
</head>
<body>
<div class="container-fluid text-center">
<h1 class="mt-5">Hello Rigo!</h1>
<h1 class="mt-5">Genera esos dominios!</h1>
<img src="./rigo-baby.jpg" />
<p class="alert alert-warning mt-4">
<p id="domainNames" class="alert alert-warning mt-4 mb-5">
If this text is <b>not</b> centered and <b>yellow</b>, you probably have
an error
</p>
<div class="fixed-bottom p-4">
Made with ❤️ by
<a href="https://www.4geeksacademy.com">4Geeks Academy</a>
</div>
</div>
</body>
</html>