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