AI Features

Fizzbuzz: Test your Flow control skills in Javascript

Assess your knowledge of flow control in Javascript by implementing the following functions.

We'll cover the following...

Test 1: Conditionally branch your code

fizzBuzz = function(num) {
// write a function that receives a number as its argument;
// if the number is divisible by 3, the function should return 'fizz';
// if the number is divisible by 5, the function should return 'buzz';
// if the number is divisible by 3 and 5, the function should return
// 'fizzbuzz';
//
// otherwise the function should return the number, or false if no number
// was provided or the value provided is not a number
}
Ask