x=x or v
if not x then x = v end
print(nil and 10) --> nil print(3 and 4) --> 4 print(nil or 7) --> 7 print(6 or 7) --> 6
No comments:
Post a Comment