题解 | #流程控制#
流程控制
http://www.nowcoder.com/practice/8a7bff7ab0d345d5ac5c82e41d9f7115
代码块
function fizzBuzz(num) {
return num === undefined || typeof num !== 'number' ? false :
(num % 3 === 0 && num % 5 === 0 ? 'fizzbuzz' :
(num % 3 === 0 ? 'fizz':
(num % 5 === 0 ? 'buzz': num)
)
)
}
