Reputation: 177
I'm reading "Programming in Lua" book and I don't understand exercise 2.1:
What is the value of the expression
type(nil)==nil?
(You can use Lua to check your answer.) Can you explain this result?"
When I execute this code I get "false" as result. I could not explain this result, from my point of view correct result should be "true". I tried
type(some_undeclared_variable)==nil
and it also gives me "false".
Upvotes: 8
Views: 1910