Swift - Variables and Constants
What will be the output of this Swift code?
var greeting = "Hello" greeting = greeting + ", World!" print(greeting)
var greeting = "Hello" greeting = greeting + ", World!" print(greeting)
greeting starts as "Hello" and is updated by adding ", World!".greeting shows the combined string "Hello, World!".15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions