What value can't an unowned reference store?
Property observers are not called on weak variables when they are set to nil.
Which of the following functions in Swift takes a trailing closure as an argument?
What concept of closures is being used in the code snippet?
What types can be used to declare unowned references?
What is the purpose of reference counting in Swift?
Is the following line of code syntactically correct in Swift?
Consider the variables are already declared in the code.
reversedNames = names.sorted(by: >)
What will be the output of the following code?
struct SomeStruct {
let mult: Int
subscript(i: Int, j: Int) -> Int {
return mult * i * j
}
}
var someVal = SomeStruct(mult: 8)
print(someVal[8, 8])
What will be the output of the following Swift code?
let yetAnotherPoint = (1, -1)
switch yetAnotherPoint {
case let (x, y) where x == y:
print("(\(x), \(y)) is on the line x == y")
case let (x, y) where x == -y:
print("(\(x), \(y)) is on the line x == -y")
case let (x, y):
print("(\(x), \(y)) is just some arbitrary point")
}
OnSite
1 Openings
FullTime
Posted 17 days ago