title: Why use a do-end block in Lua?
body: <p>I keep trying to find answers for this but fail to do so. I wanted to know, what is the do-end block actually used for? It just says values are used when needed in my book so how could I use this?</p>
  
  <p>Do I use it to reduce the scope of local variables by placing a function in a do-end loop and place local variables outside of the function but inside this do-end block and the variables will be seen by the function? But then can the function still be called?</p>
  
  <p>Sorry for being very vague. I hope that makes sense. Maybe an illustrated example might be useful ^^</p>