pos;a&apos;</span>
}

<span class="hljs-keyword">for</span> key, value <span class="hljs-keyword">in</span> <span class="hljs-built_in">pairs</span>(<span class="hljs-built_in">table</span>) <span class="hljs-keyword">do</span>
  <span class="hljs-built_in">print</span>(key, value)
<span class="hljs-keyword">end</span>
</code></pre>
<pre><code>3   c
2   b
1   a
</code></pre><p>As you can see, the order of the items isn&apos;t guaranteed with <code>pairs</code>.
<code>ipairs</code> is also optimized to handl