I'm learning Swift through Youtube using online compilers on Windows and while learning to access arrays, I experienced that I had to use "," as separator in place of "\" inside the print function. But "\" was used in the video I was watching (she was using Xcode on Mac). What's the reason behind this? I've provided the code below.
import Foundation
let friends = ["Alisa", "Alice", "Joseph"]
print("friend 1: " ,(friends[1]))
for i in 0..<friends.count { print("friend \(i): \(friends[i])") }?\(), not just \. Theprintline in your question doesn't need the()aroundfriends[1].