line of code

Hey guys.

Code Block
var d = 5
var s = "String of words"
var words = s.split(separator: " ")
var howMany = words.count
var howLong = words[2].count
var result = [words[0].count]
for b in 0..<howMany {
  var tem = words[0].count
  if result > tem {
    result = tem
  }
   
}
line 8 and 9 displays the following info:
Cannot convert value of type '[Int]' to expected argument type 'Int'

What am I doing wrong?
Any help appriciated.
Thank You
problem solved thank You. That had to do with the mistake above that is not displayed here
line of code
 
 
Q