Question: Xcode v9.4.1 - swift Exercise String Equality and Comparison Create two constants, nameInCaps and name. Assign nameInCaps your name as a string literal with proper
Xcode v9.4.1 - swift


Exercise String Equality and Comparison Create two constants, nameInCaps and name. Assign nameInCaps your name as a string literal with proper capitalization. Assign name your name as a string literal in all lowercase. Write an if-else statement that checks to see if nameInCaps and name are the same. If they are, print "The two strings are equal", otherwise print "The two strings are not equal." Write a new if-else statement that also checks to see if nameInCaps and name are the same. However, this time use the lowercased() method on each constant to compare the lowercase version of the strings. If they are equal, print the following statement using string interpolations: KINSERT LOWERCASED VERSION OF nameInCaps HERE> and
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
