Your First iOS App - Part 23: Challenge: | Ray Wenderlich Videos

Try improving the algorithm to calculate the difference so it is written in less lines of code.

This is a companion discussion topic for the original entry at

Hi Ray! Thank you very much for the course. It is very very informative and clear.
I found another solution for the challenge

> difference = abs(currentValue - targetValue)

, I checked, it works. Just wondering if this solution ok or nok.

Never mind :slight_smile:

@a030507 Glad you sorted it out. Cheers! :]