Last active
May 7, 2018 16:51
-
-
Save vlad-terin/69b805ebcbaf4d85a1ed63a108b2e125 to your computer and use it in GitHub Desktop.
Eloquent Javascript My solutions
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| for (let i = 1; i <= 100; i++) { | |
| if (i % 3 === 0 && i % 5 === 0) { | |
| console.log('FizzBuzz'); | |
| } else if (i % 5 === 0) { | |
| console.log('Buzz'); | |
| } else if (i % 3 === 0) { | |
| console.log('Fizz'); | |
| } else { | |
| console.log (i); | |
| } | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| Looping a Triangle | |
| Eloquest Javascript answer | |
| */ | |
| let hash = ''; | |
| for (let i = 0; i < 7; i++) { | |
| console.log (hash += '#') | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment