This is the best I could do for the FizzBuzz exercise. Spacing is not as I put it in the console of my web browser, but that doesn’t matter.
for(var i = 1; I <=100; i++){
if (i % 3 == 0 && i % 5 == 0){
console.log ("fizzbuzz";
}
}
for(var i = 1; i <=100; i++){
if(i % 3 == 0{
console.log ("fizz");
}
}
for (var i = 1; i <= 100; i++){
if (i % 5 == 0){
console.log ("buzz");
}
}
Each set came as undefined, but I saw a number at the end of each one.
fizzbuzz = 6
fizz = 33
buzz = 20
I am very certain that these numbers show the number of times that each word appears in the order of numbers between 1 and 100. For example, "fizzbuzz"
is written in place of all numbers divisible by both 3 and 5. It appears six times in the order. Specifically, those numbers would be 15, 30, 45, 60, 75, and 90.
Now I will need assistance with the chessboard exercise. Both of these exercises will have to be in separate posts.
Thank you so much for your assistance!