Challenge: Single-Expression Functions

private fun auraColor(isBlessed: Boolean, healthPoints: Int, isImmortal: Boolean) =
if (isBlessed && healthPoints > 50 || isImmortal) "GREEN" else "NONE"

Thank’s! Nice solution. Mine looks the same.

1 Like

My solution is here: TheBigNerdRanchGuide/Chapter_4_Exercise_1.kt at main · AlexeyYuditsky/TheBigNerdRanchGuide · GitHub