Clone and edit this document
Runkit
Runkit
home page
user forum
new notebook
clone notebook
download notebook
support & documentation
log in
sign up
new notebook
help & feedback
clone this notebook
download this notebook
Sign In
Sign Up
demo: fizzbuzz-cli and fizzbuzzify
node v4.9.1
version:
3.0.0
endpoint
share
tweet
fizzbuzz-cli is an installable command line tool, but it also exports a function, which runs fizzbuzz on the console. Here it is. BE AMAZED.
let fizzbuzz = require("fizzbuzz-cli") fizzbuzz()
fizzbuzzify is a micropackage the wraps up the re-usable "fizzbuzz" logic:
let fizzbuzzify = require("fizzbuzzify") let rx = require("rx") for (i of [1, 15, 99]) { console.log(`${i} fizzbuzzified is ${fizzbuzzify(i)}`) }
Loading…
no comments
sign in
to comment