Swift Defer Statement explained

When you want to ensure that a code block is executed just before control exits the scope, Swift Defer Statement comes to your rescue. Sometimes a function is required to have multiple conditional exit point and covering those exit points without swift defer statement can lead to code duplication or it might just not be possible to … Read more