You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This snippet on exceptions is obscure. How, exactly, does :default work as a catch-all here, and does it have wider application? I know it is used in multi-methods, but have not found any other references to it.
;; JavaScript unfortunately allows you to throw anything. You can handle
;; this in ClojureScript with the following.
(try
(throw (js/Error. "Oops"))
(catch :default e
e))
I have had to track down the following syntax once before, and I think it deserves more explanation.
;; We can use property access with `set!` to change the fill color of a
;; a canvas rendering context.
(set! (.-fillColor ctxt) "#ffffff")
I'm talking about the .-fillColor.
The text was updated successfully, but these errors were encountered:
I found the discussion of property access syntax near the end of the tutorial. Just a note referring readers to that discussion would do the trick, I think.
This snippet on exceptions is obscure. How, exactly, does
:default
work as a catch-all here, and does it have wider application? I know it is used in multi-methods, but have not found any other references to it.I have had to track down the following syntax once before, and I think it deserves more explanation.
I'm talking about the
.-fillColor
.The text was updated successfully, but these errors were encountered: