|
|
|
|
|
by erikwiffin
4194 days ago
|
|
A for loop seems like a weird choice for "idiomatic underscore.js". _.each(_.range(1, 100), function (i) {
console.log(
_.chain(["Fizz", "Buzz"])
.zip(_.map([3, 5], function(n) { return i%n;}))
.where({"1": 0})
.pluck(0)
.value().join("")
|| i);
});
|
|