Practice with Primitive Types 2
Geoffrey Challen // 2020.9.0
Write a snippet of code—not a function—that:
- declares a variable
digitand initializes it to the character 'B' - declares a variable named
airTemperatureand initializes it to78.8 - declares a variable
scoreand initializes it to99 - declares a variable named
semesterHasStartedand initializes it totrue
Note that because Kotlin performs type inference, you can and should solve this problem without explicitly specifying any types.