Hacker News new | ask | show | jobs
by jrmoran 5297 days ago
This might be a little offtopic, but I would advise against leaving `console.log` calls in production code, even when there are checks to prevent calling it when the console object is undefined. Commenting those lines out would do the trick, since minification can remove them.

Also I went to the [calculator challenge](http://www.trybloc.com/courses/calculator#/1) and noticed this

    # add(4, 2) => 8
    def add(x, y)
    end
Needless to say the comment should read `=> 6`.

Also, since we are all geeks, here's my Clojure version

    (defn buzziffy [a b x]
	      (cond (and (zero? (mod x a)) (zero? (mod x b))) "FizzBuzz"
	            (zero? (mod x a)) "Fizz"
	            (zero? (mod x b)) "Buzz"
	            :else x))

    (println (apply str (map #(str (buzziffy 3 5 %) "\n")
	                      (range 1 100))))