As there does not seem to be any appropriate place for this question, I’m guessing to post this here:
let nails = 100
var hammers = 1
let hammerTitle = " hammers"
if hammers == 1 {
let hammerTitle = " hammer"
}
let toolSummary = "I have \(nails) nails and \(hammers)" + hammerTitle
This always results in:
toolSummary: I have 100 nails and 1 hammers
Any ideas what I’m doing wrong?
(for non-english speakers, I want “1 hammer”)
Thanks