dimanche 18 juin 2017

Are there any statements similar to an "If Any" in Swift 3.0 Xcode

Is there any such statement to do something similar to below? or do I need to create a function?

let x=[Double](1.023, 2.023, 3.023, 4.023, 5.023)
ler y=[Double](3.001)

if any of x > y{
("YES")}

Aucun commentaire:

Enregistrer un commentaire