let array = [2,3,5,7,3,1,8,9,0,2,4,1]
var minvalue = array[0]
for values in array {
values < minvalue ? minvalue = values : minvalue
}
print(minvalue)
This is the code i tried , I want the minimum value in the array, If I use if..else I can able to do but cant find using ternary operator.