title: Lua logic operators are different than other languages?
body: <p>So I started messing around with Lua's logical operators <strong>and</strong>, <strong>or</strong> and <strong>not</strong>.
  As stated <a href="https://www.lua.org/pil/3.3.html" rel="nofollow noreferrer">here</a> <code>print (4 and 5)</code> will return <code>5</code> while <code>print (4 or 5)</code> will return <code>4</code>.
  If you then switch around the numbers so it says <code>print (5 and 4)</code> it will return <code>4</code>.
  I understood the explanation that the <strong>and</strong> operator returns the first operand if it's <strong>false</strong> and the second one if it's <strong>true</strong>, but what I'm used to from languages like C++ is that <code>print (4 and 5)</code> returns <code>4</code>. How do I get the same result I would get in C++ or similar languages?</p>