Swift - Variables and Constants
Why does Swift require
var to declare mutable variables instead of allowing all variables to be changed by default?var to declare mutable variables instead of allowing all variables to be changed by default?var keywordvar explicitly marks variables as mutable, improving code clarity and safety.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions