Wikia

WoWWiki

API type

Talk0
101,368pages on
this wiki
Revision as of 07:34, September 19, 2013 by Celess22 (Talk | contribs)

(diff) ←Older revision | Latest revision (diff) | Newer revision → (diff)
WoW Lua

This function returns the type of variable was passed to it.

t = type(arg1);

Arguments Edit

arg1
Any - Value to query the type of.

Returns Edit

t
String - String representation of the argument's type passed: "nil", "number", "string", "boolean", "table", "function", "thread", or "userdata".

Example Edit

type("I am a string"); -- "string"
type(45); -- "number"
type({}); -- "table"
type(nil) -- "nil"

Around Wikia's network

Random Wiki