@anonymous/DismalMadSiamang
JavaScript

No description

repl talk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
// javascript
function fizzbuzz( x ) {
    var div3, div5, n;   // var declaration

    for ( var i = 1; i < x; i++ ) {
        div3 = "";
        if ( i % 3 === 0 ) {
            div3 = "fizz";
        }
        div5 = "";
        if ( i % 5 === 0 ) {
            div5 = "buzz";
        }
        n = "";
        if ( div3 === "" && div5 === "" ) {
            n = String(i);
        }
        console.log( div3 + div5 + n )
    }
}

fizzbuzz(100);
Native Browser JavaScript