Write a program that prints the numbers from 1 to 100.
But for multiples of three print “Fizz” instead of the number and
for the multiples of five print “Buzz”.
For numbers which are multiples of both three and five print “FizzBuzz”.
script
var fizz, buzz, fizz-buzz ;
for (x=0, x<100, x++){
if ( x % 3 == 0){
fizz = true;
}
if ( x % 5 == 0 ){
buzz = true;
}
if ( fizz === true && buzz === true){
console.log("fizzbuz");
}
if ( fizz === true && buzz != true){
console.log("fizz");
}
if ( fizz != true && buzz == true){
console.log("buzz");
}
if ( fizz !=== true && buzz !=== true){
console.log(x);
}
}
/script
ID: 2542
NAME: using-fizzbuzz-to-find-programmers-who-grok-coding
DESCRIPTION: ] by Imran Ghory, - An older article(2007) about using a fairly simple coding test to separate those who can code from those who can't,
AUTHOR: article.author/s
EDITOR: article.editor/s
PUBLISHER: article.publisher/s
STATUS: Write
PRIORITY: 0
OWNER ID: 75