Monday, March 26, 2012

FizzBuzz in Javascript

Joel and company probably won't hire me since he only gets rockstar developers but here is my attempt at FizzBuzz
<script>
    for(var i=1;i<=100;i++){
        if(i%3 != 0  && i%5 != 0)
            document.write(i);
        if(i%3 == 0)
            document.write('Fizz');            
        if(i%5 == 0)
            document.write('Buzz');                    
        document.write(' ');
    } //end for loop
</script>
I hope you found the post useful. You can subscribe via email or subscribe via a feed reader to get relevant updates from this blog. Have a nice day.

2 comments:

  1. Casino de Ranglet - Film File Europe
    Casino de Ranglet in 스포츠 토토 Ranglet, Malta. Ainsworth, 욜로사이트 Malta. 2,333.3 km. -1,039,737.6 miles. -1,039,737.6 miles 19 동인지 -1,039,737.6 miles. -1,039,737.6 다음 자동차 miles. -1,039,737.6 룰렛

    ReplyDelete
  2. The casino with roulette machines | Vannienailor4166 Blog
    Casino roulette game is one of the most wooricasinos.info popular https://vannienailor4166blog.blogspot.com/ casino games in Malaysia. febcasino.com It offers the latest https://deccasino.com/review/merit-casino/ games with the best odds, https://jancasino.com/review/merit-casino/ with big payouts and easy

    ReplyDelete