Answers for "lua switch"

Lua
11

lua switch

there is none :(
Posted by: Guest on January-03-2021
0

lua switch

function switch(caselist, case)
	assert(type(caselist), "Not a table")
	if(caselist[case])then
		assert(type(caselist[case]), "Not a function")
		caselist[case]()
	end
end
Posted by: Guest on July-14-2021

Browse Popular Code Answers by Language