This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
class FizzBuzz | |
{ | |
public $start; | |
public $last; | |
public function __construct($start=0, $last=100) | |
{ | |
$this->start = $start; | |
$this->last = $last; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function fizz_buzz(start, last) | |
{ | |
var i; | |
for (i = start; i <= last; i++) { | |
var isFizz = i % 3 == 0; | |
var isBuzz = i % 5 == 0; | |
var string = ''; | |
if (isFizz) |