This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-12-25
Channels
- # adventofcode (16)
- # babashka (8)
- # beginners (13)
- # calva (22)
- # clj-on-windows (20)
- # clojure (49)
- # clojure-australia (1)
- # clojure-europe (6)
- # clojure-nl (2)
- # clojure-uk (3)
- # clojurescript (4)
- # emacs (1)
- # fulcro (20)
- # introduce-yourself (2)
- # java (2)
- # missionary (2)
- # off-topic (10)
- # other-languages (2)
- # pathom (4)
- # re-frame (15)
I'm reading Learn Clojurescript
and an exercise asks to: "Create a JavaScript object from the REPL and make it available as `window.myVar`." I am struggling with how to make a global var. Everything I try is creating a namespaced var like cljs-practice.core.myVar
. How do I make them global?
Hey there! Take a look at the set! function
There is an example on this page: https://lwhorton.github.io/2018/10/20/clojurescript-interop-with-javascript.html