I know what \"?\" and \"!\" mean when I declare variables in Swift. But what do they mean when using these variables? For example, in this code:
var
Both symbols ! and ? used for optionals. We should have to use !, when we make sure option type variable has value at a time and we need to take action on it.Otherwise It will crash if variable value is nil.And if you are using ?, Application will not crash in nil case.
You can follow this link for more information:- https://www.youtube.com/watch?v=twBfiKsbHP8