Question: in Swift on xcode / / / / / / / / / / / / / / / / / / / / /
in Swift on xcode
Chapter Special Instructions
Define and print an "Optional Type" String variable called "flightNumber"
YOUR CODE GOES HERE
Use "Forced Unwrapping" to print the flightNumber
YOUR CODE GOES HERE
Define and print and optional type that contains nil called "destination"
YOUR CODE GOES HERE
Use "Unwrapping Multiple Optionals" for "destination" & "origination"
Define "origination" to DTW which is Detroit Metro and destination is "AUA"
YOUR CODE GOES HERE
Use "Implicitly Unwrapped Optionals" for "roundTripAmount"; data type is Float
Use optional binding to print and format the amount
YOUR CODE GOES HERE
Use "Optional Chaining" to define and print "flightStatus" to "cancelled", lowercase
YOUR CODE GOES HERE
"Modify an Optional in Place" by "append"ing AM to a variable called "departure"
Define variable to :
YOUR CODE GOES HERE
Use "The Nil Coalescing Operator" to validate the "arrival" is nil
YOUR CODE GOES HERE
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
