R

Ravina • 2.56K Points
Extraordinary

Q. What is the output of the code below?

Code:
let str = "Hello"
print(str.uppercased())
  • (A) hello
  • (B) HELLO
  • (C) Hello
  • (D) error
  • Correct Answer - Option(B)
  • Views: 1
  • Filed under category Swift (iOs)
  • Hashtags:

Explanation by: Ravina
The `uppercased()` method converts all characters to uppercase.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.