title: Index a certain table based on variable?
body: <p>Is there a way to index a table defined by a variable in Lua? For example:</p>
  
  <pre><code>function checkTable(t, k)
      return t[k]
  end
  
  checkTable(coffee, 1)
  </code></pre>
  
  <p>to return the value of any key of any table.</p>
  
  <p>However, this would return item 1 of the table "t", and not the table "coffee"; the function is not recognizing "t" as a variable and is instead looking for the literal table "t". How should this be done?</p>