SwiftBank, Step 10

https://www.codecademy.com/paths/ios-developer/tracks/building-code-history-part-two-swiftui/modules/properties-and-access-control-swiftui/projects/swift-bank-swiftui

I am completely stumped on step 10… unsure how to incorporate the isValid() method for the displayBalance() method.

private func isValid(_ enteredPassword: String) -> Bool {
  if enteredPassword == password {
   return true
   } else {
   return false
  }
 }

func displayBalance(usingPassword password: String) -> Bool {
  if isValid(_:) {
    print("Error: Invalid password. Cannot retrieve balance.")
    return false
  }
}

You can use this to verify if the password passes the ifValid method:
if !isValid(password) {
print(“Error: Invalid password. Cannot retrieve balance.”)
return
}