Swift
Tuples: uses and limits
When is it appropriate to use a tuple in Swift?
How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
When is it appropriate to use a tuple in Swift?
A tuple suits short-lived values that don't need a name, like a function's multiple return values or a temporary grouping within one scope.
SwiftShort answerBasics
In Swift, what's the fundamental difference between a struct and a class?
#struct
SwiftMultiple choiceIntro
What does this code print? …
#struct
SwiftShort answerBasics
Which line in this code fails to compile, and why? …
#struct
SwiftShort answerBasics
When you build model types to serialize and deserialize a server's JSON response, should…
#struct