1/*
2JavaScript can be used to do neat things like creating
3animation in HTML. ... JavaScript code is run on a
4browser only, while Java creates applications that run
5in a virtual machine or browser. Java is an OOP
6(object-oriented programming) language, and JavaScript is
7specifically an OOP scripting language.
8*/
1chunk of code written in Kotlin is much smaller compared to Java, as it is less verbose and less code means fewer bugs. Kotlin compiles the code to a bytecode which can be executed in the JVM. Thus, all the libraries and frameworks made in Java can be moved and run in a Kotlin project.
1// if is an expression, so ternary operation not needed
2val loaded = true
3val status = if (loaded) "Ready" else "Loading..."
4// "Ready
1Kotlin is a language built on and entirely backwards-compatible with Java.
2While Java is Object-Oriented first, Kotlin supports a blend
3of OO and functional paradigms. For further information, refer to
4kotlinlang.org