This `val healthBonus` inside the init block doesn...
# getting-started
f
This
val healthBonus
inside the init block doesn't make much sense, does it?
t
You could indeed declare it outside of the
init
block, right under the
health
declaration. Note that declarations and init blocks are executed in order.
a
I would think that declaring it within the
init
block makes it a variable scoped to the block, so it wouldn't even be a property
💯 4
f
yes it's not a property, that's why I'm confused
maybe I just misunderstand the example tho