2023-05-04 10:32:15 +00:00
|
|
|
#!/usr/bin/env luajit
|
2022-01-31 20:52:13 +00:00
|
|
|
fruits = {"banana","orange","apple","grapes"}
|
|
|
|
|
|
|
|
for k,v in ipairs(fruits) do
|
|
|
|
print(k,v)
|
|
|
|
end
|
|
|
|
|
|
|
|
table.sort(fruits)
|
|
|
|
print("sorted table")
|
|
|
|
|
|
|
|
for k,v in ipairs(fruits) do
|
|
|
|
print(k,v)
|
|
|
|
end
|