you can put questionmarks by types:
function foo (number: number | string? --[[<-- this]])
local number = tonumber(number)
return number * 2
end
what do they do?
you can put questionmarks by types:
function foo (number: number | string? --[[<-- this]])
local number = tonumber(number)
return number * 2
end
what do they do?
optional. can be nil or whatever else.
This discussion is preserved as it was. New answers, comments, and votes are closed.
1 comment
so that's how you make optional variables??? thanks!