Kotlin's popularity can't be denied, and yet the vast majority of the attention given to Kotlin is within the realm of the JVM. Even more specifically, Kotlin is primarily used within the Android development community. However, one of the most interesting, ambitious, and potentially game-changing things about Kotlin is that it is becoming more and more useful beyond Android as new compilation targets become viable.
JetBrains continues to invest in support for multiple compilation targets for Kotlin. This means that it's possible to write Kotlin code that is compiled for targets other than the JVM. Currently, those targets include the following:
- JavaScript
- Native
- Multiplatform
In this section, we're going to explore the ramifications of targeting JavaScript with Kotlin. We will also see how the compilation to JavaScript works, where we can...