-
Notifications
You must be signed in to change notification settings - Fork 23
Open
Description
nil 才是关键字,比如:
local myHero = Heroes.GetLocal()
if myHero == nil then ... end -- correct
if not myHero then ... end -- correct
if myHero == nill then ... end -- wrong
`
有意思的是,对于未声明的变量:
wtf == 1 -- false
wtf == nil -- true
wtf == nill -- true
wtf == nillonglongstring -- true
wtf == anotherWtf -- true
Metadata
Metadata
Assignees
Labels
No labels