Swift 5.7: Shorthand for optional unwrapping

Swift 5.7: Shorthand for optional unwrapping

Swift 5.7 comes with a new feature that saves our time

To unwrap an optional value we used to do

if let username = username {
  print(usernname)
}

After Swift 5.7 new shorthand, we can easily do

if let username {
  print(usernname)
}

Without repeating the variable name again

Start using the new shorthand and save your time!