Logo

Programming-Idioms

History of Idiom 165 > diff from v54 to v55

Edit summary for version 55 by Christopher Woo:
[Lua] Show lua array

Version 54

2019-09-27, 23:03:54

Version 55

2020-04-27, 01:55:48

Idiom #165 Last element of list

Assign to variable x the last element of list items.

Idiom #165 Last element of list

Assign to variable x the last element of list items.

Code
local x = items[#items]
Code
local x = items.at(0)
Comments bubble
Gets the last sequential item
Comments bubble
Gets the last sequential item
Doc URL
https://www.lua.org/manual/5.3/manual.html#3.4.7
Doc URL
https://www.lua.org/manual/5.3/manual.html#3.4.7