Advertisement
hevohevo

the table is an array

Mar 28th, 2016
526
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.28 KB | None | 0 0
  1. local fruits = {"apple", "banana", "orange"}    -- 配列「fruits」の作成
  2. print("I like an", fruits[1])    -- 配列の1番目の要素を利用
  3. fruits[1] = "dorian"    -- 配列の1番目の要素を書き換え
  4. print("I hate an", fruits[1])    -- 配列の1番目の要素を利用
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement