Practice using Booleans on your own, through a hands-on challenge.
This is a companion discussion topic for the original entry at https://www.raywenderlich.com/4736-programming-in-kotlin/lessons/8
Practice using Booleans on your own, through a hands-on challenge.
Possible errata in the example:
The first portion of the challenge states to “Create a constant called ‘myAge’”. Then in the later portion it asks " Use the constant called myAge
and initialize it with your age". It is my understanding that you cannot re-assign a constant later in the code and the constant is already initialized.
Possible solution:
I just reviewed the code and realize the confusion. The comments are a bit misleading in that it says to initialize the constant 2x even though it should be initialized 1x at the beginning.
I’ll clean up the comments to reflect that.
Thanks!