Question 1

Review the code.
struct ContentView: View {
let fruits = [ " Apple " , " Banana " , " Kiwi " ]
var body: some View {
List(fruits, id: \.self) { fruit in
Text(fruit)
.font(.headline)
.padding()
}
}
}
Which of the following statements is true about the code?
  • Question 2

    Review the code snippet.

    Which statement completes the code snippet so that:
    * The lastReleaseDate remains the same when nextApplePhone.releaseDate is nil.
    * The lastReleaseDate updates to the nextApplePhone.releaseDate when nextApplePhone.releaseDate is NOT nil.
  • Question 3

    Which two statements about building an app are true? (Choose 2.)
  • Question 4

    Which code correctly creates a size 300 rectangular Image View with rounded corners that displays the entire image, regardless of size?
  • Question 5

    Complete the code that conforms to the View protocol by selecting the correct option from each drop-down list.
    Note: You will receive partial credit for each correct answer.