Chapter 4 : Variables



Variables



A variable is a storage location which contains some known or unknown quantity or information, a value. The variable name is the way to reference the stored value.

What is a Variable


You can declare a varable in Swift just as you do it in javascript,



You can assign a value of any datatype to variable for example int, char, String or double.




You can re-asign a value to a variable,




You can assign multiple variables in a single line as follows,