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




End current if/else block, and start a else block




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




## Returns




* ` this `