JavaScript and Kotlin can easily interoperate. Here I'll provide some excerpts from official documentation as well as links to that documentation.
Calling Kotlin code from JS
To prevent spoiling the global object, Kotlin creates an object that
contains all Kotlin declarations from the current module. So if you
name your module as myModule, all declarations are available to
JavaScript via myModule object. For example:
fun foo() = "Hello"
Can be called from JavaScript like this:
alert(myModule.foo());
Calling JS code from Kotlin
To tell Kotlin that a certain declaration is written in pure
JavaScript, you should mark it with external modifier. When the
compiler sees such a declaration, it assumes that the implementation
for the corresponding class, function or property is provided by the
developer.
I will add here that external function can be provided not necessarily by developer themselves - it can be something that already exist in this environment - like browser API.