Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Creating habits v2, Lua (WIP)
--[[ Creating habits v2, Lua This program will attempt to list letters in alphebetical order (Practicing commenting & consistentcy) ]]-- local letters = "abcdefghijklmnopqrstuvwxyz" -- List of letters in alphebetic order -- local function mainFunc(input) local str = "" -- We will store the input letters in order using str -- for i = 1, #input do -- Goes through the input letters -- if string.sub(input, i, i) == string.find(letters, string.sub(input, i, i)) then str = str.. string.sub(input, i, i) end end print(str) -- Prints the end result -- end mainFunc("acdbA") -- Runs the function -- Letters inside is what the function tries to order --
run
|
edit
|
history
|
help
0
Basic class example
VERSION
PAID HACK PuBG
Random numbers in Lua. Range: 1-49. Sets of numbers without duplicates
фыв
Conta valores acima da média - LUA
Simple Lua primality test
VWPASSATPOLIZEI
test
Enums in Lua (library)