In Swift, the
first property is used to return the first character of a string.
This property returns the first character of a string.
// create strings let name = "Theodore" let greetings = "Welcome to Edpresso!" // print first characters of strings. print(name.first!) print(greetings.first!)
firstproperty to get the first characters of the strings. Next, we print the values to the console.
View all Courses