Chapter I · Language basics / Lesson 1 of 27

Values & types

You'll learn: Recognise Lua's eight types and how integer/float numbers behave.

Lua has just eight types: nil, boolean, number, string, function, userdata, thread, and table. Numbers split into two subtypes — 64-bit *integer* and *float* — and Lua tracks which is which. Strings are interned immutable byte sequences.

values.lua
Output idle
Hit Run to execute.
Try it: Add a line that prints type(3.0 == 3) and predict the result before running.