diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..7a9dfa0 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,15 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "type": "pwa-chrome", + "request": "launch", + "name": "Launch Chrome against localhost", + "url": "http://localhost:8080", + "webRoot": "${workspaceFolder}" + } + ] +} \ No newline at end of file diff --git a/JavaScript/fizzbuzz_1.js b/JavaScript/fizzbuzz_1.js new file mode 100644 index 0000000..ecb3d36 --- /dev/null +++ b/JavaScript/fizzbuzz_1.js @@ -0,0 +1,17 @@ +let fizzBuzz = (n) => { + for (let i = 1; i <= n; 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