i would like to know what's the different between these two way to print the object in Swift. The result seems identical.
var myName : String = "yohoo"
print ("My name is \(myName).")
print ("My name is ", myName, ".")
i would like to know what's the different between these two way to print the object in Swift. The result seems identical.
var myName : String = "yohoo"
print ("My name is \(myName).")
print ("My name is ", myName, ".")
No difference between the two
var favoriteFood: String = "Pizza" //favoriteFood = Pizza
//both print the same thing
print("My favorite food is", favoriteFood)
print("My favorite food is \(favoriteFood)")