Swift programming for beginners

--

HI friends , in the topic we will start programming with Swift programming for IOS developers at beginner level.

Constants and Variables in Swift

The value of a constant can’t be changed once it’s set, whereas a variable can be set to a different value in the future.
You declare constants with the let keyword and variables with the var keyword.

For example :
let maximumNumberOfLoginAttempts = 10
var currentLoginAttempt = 0
maximumNumberOfLoginAttempt = 123; // this will give error because its constant and cannot be change.

--

--

Muhammad Junaid Bashir
Muhammad Junaid Bashir

Written by Muhammad Junaid Bashir

0 Followers

Software engineer — Mobile App developer

No responses yet