Question: this is done in swift apple programming don't know how to make it see if there is a string in there or not /*: Write
this is done in swift apple programming don't know how to make it see if there is a string in there or not
/*:
Write an if statement that will use `isEmpty` to check if there is anything in the array. If there is not, print a statement asking the user to commit to a challenge. Add an else-if statement that will print "The challenge you have chosen is
*/
let userPickedChallenges: [String] = []
if userPickedChallenges.isEmpty {
print("Please input a daily challenge.")
}
if userPickedChallenges.contains() {
print("The challenge you have chosen is walk 1 mile.")
}
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
