Skip to content

Instantly share code, notes, and snippets.

@holyjak
Last active October 3, 2023 07:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save holyjak/5ff187847756263be17d7c4c19f978b5 to your computer and use it in GitHub Desktop.
Save holyjak/5ff187847756263be17d7c4c19f978b5 to your computer and use it in GitHub Desktop.
SCI Playground demo gist

A sample gist that can be loaded into the SCI Playground.

DON'T DELETE! - referred to by the playground.

(defn attach-msg [msg]
(.append (js/document.getElementById "app")
(doto (js/document.createElement "p")
(.append msg))))
(attach-msg "Hello from a .clj file!")
(attach-msg "Hi from a .cljs file!")
(attach-msg
(str "Hola! Estas "
(or #?(:clj "Clojure" :cljs "ClojureScript")
"neither-clj-nor-cljs-according-to-sci")))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment