An introduction to Foreign Function Interface with PureScript, using FFI imports to call JS from PureScript, calling PureScript from JS, and calling JS from PureScript as arguments from JS.
See https://purescript-resources.readthedocs.io/en/latest/ffi.html for more information