Advertisement
RoScripter

Arrays

Mar 10th, 2020
262
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Lua 0.15 KB | None | 0 0
  1. local numbers = {1, 2, 5 ,6}
  2.  
  3. local currentSum = 0
  4.  
  5. for index = 1, #numbers do
  6.     currentSum = currentSum + numbers[index]
  7. end
  8.  
  9. print(currentSum)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement