From 0288a4930cd587928baf550b8d7e5e9a3cfebb80 Mon Sep 17 00:00:00 2001 From: FranJ Date: Mon, 24 Jul 2023 15:53:43 +0200 Subject: [PATCH] Reto #0 - javascript --- .../javascript/Rolo27s.js" | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 "Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/javascript/Rolo27s.js" diff --git "a/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/javascript/Rolo27s.js" "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/javascript/Rolo27s.js" new file mode 100644 index 0000000000..e18ba5753f --- /dev/null +++ "b/Retos/Reto #0 - EL FAMOSO FIZZ BUZZ [F\303\241cil]/javascript/Rolo27s.js" @@ -0,0 +1,12 @@ +// Solucion Reto #0: EL FAMOSO "FIZZ BUZZ" +for (let i = 1; i <= 100; i++) { + if (i % 3 == 0 && i % 5 == 0) { + console.log("fizzbuzz"); + } else if (i % 3 == 0) { + console.log("fizz"); + } else if (i % 5 == 0) { + console.log("buzz"); + } else { + console.log(i); + } +} \ No newline at end of file