Skip to content

Instantly share code, notes, and snippets.

@aharpole
Created January 30, 2016 01:14
Show Gist options
  • Save aharpole/42e0a9312bfcb2e55df4 to your computer and use it in GitHub Desktop.
Save aharpole/42e0a9312bfcb2e55df4 to your computer and use it in GitHub Desktop.
Remarkably wrong FizzBuzz
function counter(){
for (i=0; i<100; i++) {
var countThree=i/3;
var countSeven=i/7;
if (countThree.indexOf(“.”)==null){
document.write(i + “fizz”);
} else {
if (countSeven.indexOf(“.”)==null){
document.write(i + “buzz”);
} else {
document.write(i);
}
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment