Lua - if else statement

Published 2014/03/03 by Admin in LUA
Tags: , , , ,

The if statement coupled with the else keyword now gives us 2 options that allows for multiple outcomes based on the conditions we are testing against.

b="happy"

if b=="sad" then

print("b is sad")

else

print("b is not sad")

end


Add comment

  Country flag

biuquote
  • Comment
  • Preview
Loading

my coding

This is a collection of all the coding gems I have found and would like to share with the world!