Your First iOS & SwiftUI App: An App from Scratch, Episode 27: Variables & Constants |

Finalize the difference algorithm and score calculation, and learn about an important Swift concept: the difference between variables and constants.

This is a companion discussion topic for the original entry at

Take this simplification to the next level:

  func points(slidervalue: Int) -> Int {
    return 100 - abs( - slidervalue)