Excellent job! You’ve completed the first lesson of the Data Types & Variables section. Let’s review what was covered.
varkeyword followed by a name, colon and data type.
varkeyword and represents a value that is expected to change throughout a program.
valkeyword and represents a constant value.
Feel free to utilize the empty Review.kt file and output terminal on the right to hone your understanding of variables and data types and practice writing Kotlin code.
Here are some ways in which you can practice your new knowledge:
falsedepending on if you’re currently listening to your favorite song!
Think about which of these variables should be declared as mutable or immutable. If you’ve declared them with specified types, try omitting the types and shortening your code.