Swift - Collections
Find the problem in this Swift code snippet:
var colors = ["Red", "Green"]
let colors = ["Blue"]
colors.append("Yellow")var colors = ["Red", "Green"]
let colors = ["Blue"]
colors.append("Yellow")colors is declared as a mutable variable with var.colors with let in the same scope is not allowed and causes a compile-time error.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions