Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

buzz fizz javascript

// Buzz fizz javascript
function fizzBuzz(){
    for(let i=1; i<=100; i++){
 if(i % 3 === 0 && i % 5){
        console.log("fizzBuzz")
    }
    if else (i % 3 === 0){
        console.log("fizz")
    }else if(i % 5 === 0){
        console.log("Buzz")
    }else{
        console.log(i)
    }
    }
}
fizzBuzz()
 
PREVIOUS NEXT
Tagged: #buzz #fizz #javascript
ADD COMMENT
Topic
Name
3+4 =