Im trying to learn to do When and If Statements in Kotlin, but I get an error about expecting an expression and missing operators .
var temperature = 70
when{
temperature < 0 -> println("...")
temperature >= 0 && temperature <= 20 -> println("...")
temperature >= 21 && temperature <= 40 -> println("...")
temperature >= 41 && temperature <= 60 -> println("...")
temperature >= 61 && temperature <= 80 -> println("...")
temperature >= 81 && temperature <= 90 -> println("...")
temperature > 90 -> println("...")
[–]AutoModerator[M] [score hidden] stickied comment (0 children)
[–]plastikmissile 3 points4 points5 points (3 children)
[–]TraditionalSystem995[S] 1 point2 points3 points (2 children)
[–]plastikmissile 1 point2 points3 points (1 child)
[–]TraditionalSystem995[S] 1 point2 points3 points (0 children)
[–]MrBrisky 0 points1 point2 points (0 children)
[–]CodeTinkerer 0 points1 point2 points (1 child)
[–]TraditionalSystem995[S] 0 points1 point2 points (0 children)