首页 > 试题广场 >

下面的代码输出是什么?() var thing&

[单选题]

下面的代码输出是什么?()

var thing = "cars"
let closure = { [thing] in
  print("I love \(thing)")
}
thing = "airplanes"
closure()

  • "I love airplanes"
  • "I love cars"
  • nil
  • 错误日志
为什么,不能理解
发表于 2022-03-23 11:09:15 回复(0)