extension Int {
subscript(var myInt: Int) -> Int {
var no1 = 1
while myInt > 0 {
no1 *= 10
--myInt
}
return (self / no1) % 10
}
}
print(12[0])
What is the output?
Correct Answer:
2
Explanation:
Note: This Question is unanswered, help us to find answer for this one
More Swift MCQ Questions