You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<title>question one</title>
<script language="javascript">
/*Question 1: FizzBuzz
Write a program that prints the numbers from 1 to 100. For multiples of 3, print "Fizz"; for
multiples of 5, print "Buzz"; and for numbers that are multiples of both 3 and 5, print
"FizzBuzz".*/
function fizzbus(){
var number;
for (number = 1; number<=100; number ++){
if(number%3 === 0 && number%5 === 0){
document.write('fizzbuzz ');
}
else if(number%3 === 0){
document.write('fizz ');
}
else if(number%5 === 0){
document.write('buzz ');
}
else{
document.write(number + ' ');
}
}
}
</script>
calculate