Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Write your code below
- var x = 10;
- if (x % 3 === 0 && x % 5 === 0) {
- result = "fizzbuzz";
- }
- else if (x % 3 === 0) {
- result = "fizz";
- }
- else if (x % 5 === 0) {
- result = "buzz";
- }
- else {
- result = x;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement