Comparison OperatorsSwift 4 supports all standard comparison operators of C language.
Note: Swift 4 also provides two identity operators (=== and !==), which is used to test whether both object references refer to the same object instance.Every comparison operator returns a Bool value to specify whether the statement is true or not. Comparison operators are used in conditional statement as if statement. Example 1Output: hello, world Example 2Output: I am sorry. I don't recognize you
Next TopicTernary Conditional
|