let
let就跟*.run一样。必须有对象,并且这对象会带进匿名函数里,名字叫it
fun main(args : Array<String>){
var v1 = "fd"
var v2:String?
v2 = v1?.let{
it + " hi"
}
println(v2)
}
let就跟*.run一样。必须有对象,并且这对象会带进匿名函数里,名字叫it
fun main(args : Array<String>){
var v1 = "fd"
var v2:String?
v2 = v1?.let{
it + " hi"
}
println(v2)
}