nbb

Gregory Bleiker 2025-07-10T08:49:00.663509Z

I have a clojure vector [1 2 3] and would like to create a js string representation of this '[1,2,3]' . I have been using js/JSON.stringify for this. Is there a better way?

Gregory Bleiker 2025-07-15T16:11:34.566119Z

just discovered the clj->js function, if anyone was wondering šŸ˜€

jf 2025-07-20T14:36:33.490879Z

I’m confused. clj->js produces a javascript array [1, 2, 3] surely, and not a js string? Or are you doing (js/JSON.stringify (clj->js [1 2 3])) ?

Gregory Bleiker 2025-07-20T16:31:12.833399Z

@jf.slack-clojurians sorry, you're correct of course. I should have posted the full example.