Swift question
Swift question
- Subject: Swift question
- From: David Delmonte <email@hidden>
- Date: Wed, 04 Jun 2014 21:11:39 +0300
As there does not seem to be any appropriate place for this question, I’m guessing to post this here:
and have a simple question…
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
|
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden