Let's start at the beginning. How is it that we can write Kotlin code that is then consumed as JavaScript? Throughout this book, we've seen many examples of how Kotlin is compiled down to JVM-compatible bytecode and how Kotlin interoperates so seamlessly with Java. With this in mind, it probably sounds a bit odd at first that we can take that same Kotlin code and use it in a JavaScript environment, so let's dive a bit deeper into how this is achieved.