Combine nested if

Here’s the code if you want to experiment with it!

func displayIfConditions(value: Int) {
    if value.isMultiple(of: 2),
       value.isMultiple(of: 3),
       value.isMultiple(of: 5),
       value.isMultiple(of: 7) {
        print(value)
    }
}
Previous
Previous

dump() vs print()

Next
Next

modern API of UIButton