简体   繁体   中英

Javascript interop assignment in Clojurescript

Dumb question: how do I do Javascript assignment in Clojurescript ? I'm using a Javascript lib and need to set the value of an object's field like obj.this=that; - I don't know Javascript so maybe there's a .set method ?

尝试一些类似的事情

(set! (.-property foo) 5)

Use

(aset foo "property" 5)

Be aware, that symbolic references may fail .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM