Welcome! Please see the About page for a little more info on how this works.

0 votes
in ClojureScript by
retagged ago by

Using console.log on a CLJS collection or sequence returns an internal representation of the object that looks like `Object { meta: null, cnt: 3, shift: 5, root: {…}, tail: (3) […], __hash: null, "cljs$lang$protocol_mask$partition0$": 167666463, "cljs$lang$protocol_mask$partition1$": 139268 }`. This seems like an easy pitfall for a beginner since console.log is a standard debugging tool for JS developers. Referring users to something like binaryage/devtools or any of the built-in functions for converting CLJS types to JS types might be helpful.

Notably, `println` and `cljs.pprint/pprint` work well for collections, also.

1 Answer

0 votes
ago by