js/something designed to access the js object, but after that you should not insert dots, as this is not clojure syntax, and it should be removed. In older versions of the compiler (2138), your code works, but it is possible that it is deprecated in new versions of the compiler. Which version are you using?
The correct way would be to use a simple js interop as follows: [Caveat: see comment below from David Nolen, ClojureScript developer]
(defn log [& args] (apply (.-log js/console) args))
And even shorter, since console.log is already a variable (just make an alias):
(def log (.-log js/console))
Joaquin
source share