iOS Swift - Swift Language Essentials
What will be the output of this Swift code?
var name = "Alice" name = "Bob" print(name)
var name = "Alice" name = "Bob" print(name)
name is declared with var, so it can be changed after initial assignment.name is "Alice". Then it is reassigned to "Bob". The print statement outputs the current value, "Bob".15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions