Fork me on GitHub
#clojurescript
<
2021-12-25
>
Chase16:12:04

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?

athomasoriginal17:12:00

Hey there! Take a look at the set! function

Chase21:12:36

Ahh, thank you. I don't know why I was thinking set! was only to alter an already existing js var.