Created
September 12, 2024 22:01
-
-
Save lucianoschillagi/6aa230c27fd6649450eb2334c0ebf425 to your computer and use it in GitHub Desktop.
precondition method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import Foundation | |
| // Swift Standard Library - Exploring its methods! | |
| // The 'precondition' method. | |
| let faceWithSunglasses: Character = "π" | |
| //let faceWithSunglasses: Character = "π" | |
| // if this precondition is not true, the program will be interrupted | |
| precondition(faceWithSunglasses == "π", | |
| "Please put it your sunglasses") | |
| print(faceWithSunglasses) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment