This is a bit more idiomatic than ```c++ auto it = table.begin(); auto k = *it; table.remove(it); ``` and also saves us from copying the stored value.
@@ -939,9 +939,7 @@ ThrowCompletionOr<void> GetObjectPropertyIterator::execute_impl(Bytecode::Interp
return result_object;
}
- auto it = items.begin();
- auto key = *it;
- items.remove(it);
+ auto key = items.take_first();
// If the key was already seen, skip over it (invariant no. 4)
auto result = seen_items.set(key);