October 2019
Intermediate to advanced
434 pages
11h 54m
English
Possibly the easiest way to start consuming our transpiled JavaScript is to load that JavaScript with a <script> tag within an HTML document. In doing this, we can run our main() function when the script is loaded and examine the output in the developer console.
To demonstrate this, let's walk through the following steps:
<!DOCTYPE html><html lang="en"> <head> <meta charset="UTF-8"> <title>HelloKotlinJS</title> </head> <body bgcolor="#E6E6FA"> <!-- will load our JavaScript here --> </body></html>
By adding this file, we give ourselves an entry point from which to load and run our JavaScript. If you then open ...
Read now
Unlock full access