---
layout: docs
title: endForeachLoop
id: class.Facebook.HackCodegen.HackBuilder.endForeachLoop
docid: class.Facebook.HackCodegen.HackBuilder.endForeachLoop
permalink: /docs/reference/class.Facebook.HackCodegen.HackBuilder.endForeachLoop/
---
# Facebook\\HackCodegen\\HackBuilder::endForeachLoop()




Strictly equivalent to calling closeBrace, which unindent and newline,
but for readability, you should use this with startForeach




``` Hack
public function endForeachLoop(): this;
```




## Returns




* ` this `