DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR LUA
lua how to default value if nil or false
local function foo(x, y, z) local x = x or true local y = y or 1234 z = z or "default" end
Source by stackoverflow.com #
PREVIOUS
NEXT
Tagged:
#lua
#default
#nil
#false
ADD COMMENT
Topic
COMMENT
Name
5+8 =
Submit